@socialgouv/modeles-social 4.101.2 → 4.102.1
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/CHANGELOG.md +20 -0
- package/bin/modeles/common/factory/seniority.js +4 -0
- package/bin/modeles/common/supported-agreements.d.ts +1 -0
- package/bin/modeles/common/supported-agreements.js +2 -1
- package/bin/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/anciennete.spec.d.ts +1 -0
- package/bin/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/anciennete.spec.js +22 -0
- package/bin/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/formule.spec.d.ts +1 -0
- package/bin/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/formule.spec.js +122 -0
- package/bin/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/indemnite.spec.d.ts +1 -0
- package/bin/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/indemnite.spec.js +78 -0
- package/bin/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/missing-args.spec.d.ts +1 -0
- package/bin/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/missing-args.spec.js +75 -0
- package/bin/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/references.spec.d.ts +1 -0
- package/bin/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/references.spec.js +108 -0
- package/bin/modeles/conventions/1404_sedima/index.d.ts +1 -0
- package/bin/modeles/conventions/1404_sedima/index.js +17 -0
- package/bin/modeles/conventions/1404_sedima/seniority.d.ts +7 -0
- package/bin/modeles/conventions/1404_sedima/seniority.js +70 -0
- package/bin/modeles/conventions/2148_telecommunications/__tests__/indemnite-licenciement/anciennete.spec.d.ts +1 -0
- package/bin/modeles/conventions/2148_telecommunications/__tests__/indemnite-licenciement/anciennete.spec.js +22 -0
- package/bin/modeles/conventions/2148_telecommunications/__tests__/indemnite-licenciement/formule.spec.js +1 -1
- package/bin/modeles/conventions/2148_telecommunications/index.d.ts +1 -0
- package/bin/modeles/conventions/2148_telecommunications/index.js +1 -0
- package/bin/modeles/conventions/2148_telecommunications/seniority.d.ts +7 -0
- package/bin/modeles/conventions/2148_telecommunications/seniority.js +52 -0
- package/bin/modeles/conventions/index.d.ts +1 -0
- package/bin/modeles/conventions/index.js +1 -0
- package/lib/modeles/common/factory/seniority.js +4 -0
- package/lib/modeles/common/supported-agreements.d.ts +1 -0
- package/lib/modeles/common/supported-agreements.js +2 -1
- package/lib/modeles/common/utils/ccn-supported.json +1 -1
- package/lib/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/anciennete.spec.d.ts +1 -0
- package/lib/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/anciennete.spec.js +22 -0
- package/lib/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/formule.spec.d.ts +1 -0
- package/lib/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/formule.spec.js +122 -0
- package/lib/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/indemnite.spec.d.ts +1 -0
- package/lib/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/indemnite.spec.js +78 -0
- package/lib/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/missing-args.spec.d.ts +1 -0
- package/lib/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/missing-args.spec.js +75 -0
- package/lib/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/references.spec.d.ts +1 -0
- package/lib/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/references.spec.js +108 -0
- package/lib/modeles/conventions/1404_sedima/index.d.ts +1 -0
- package/lib/modeles/conventions/1404_sedima/index.js +17 -0
- package/lib/modeles/conventions/1404_sedima/seniority.d.ts +7 -0
- package/lib/modeles/conventions/1404_sedima/seniority.js +70 -0
- package/lib/modeles/conventions/2148_telecommunications/__tests__/indemnite-licenciement/anciennete.spec.d.ts +1 -0
- package/lib/modeles/conventions/2148_telecommunications/__tests__/indemnite-licenciement/anciennete.spec.js +22 -0
- package/lib/modeles/conventions/2148_telecommunications/__tests__/indemnite-licenciement/formule.spec.js +1 -1
- package/lib/modeles/conventions/2148_telecommunications/index.d.ts +1 -0
- package/lib/modeles/conventions/2148_telecommunications/index.js +1 -0
- package/lib/modeles/conventions/2148_telecommunications/seniority.d.ts +7 -0
- package/lib/modeles/conventions/2148_telecommunications/seniority.js +52 -0
- package/lib/modeles/conventions/index.d.ts +1 -0
- package/lib/modeles/conventions/index.js +1 -0
- package/lib/modeles/modeles-indemnite-licenciement.json +295 -1
- package/package.json +2 -2
- package/src/modeles/common/factory/seniority.ts +6 -0
- package/src/modeles/common/supported-agreements.ts +2 -1
- package/src/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/anciennete.spec.ts +32 -0
- package/src/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/formule.spec.ts +176 -0
- package/src/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/indemnite.spec.ts +133 -0
- package/src/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/missing-args.spec.ts +137 -0
- package/src/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/references.spec.ts +157 -0
- package/src/modeles/conventions/1404_sedima/indemnite-licenciement.yaml +222 -0
- package/src/modeles/conventions/1404_sedima/index.ts +1 -0
- package/src/modeles/conventions/1404_sedima/seniority.ts +102 -0
- package/src/modeles/conventions/2148_telecommunications/__tests__/indemnite-licenciement/anciennete.spec.ts +33 -0
- package/src/modeles/conventions/2148_telecommunications/__tests__/indemnite-licenciement/formule.spec.ts +2 -2
- package/src/modeles/conventions/2148_telecommunications/indemnite-licenciement.yaml +1 -1
- package/src/modeles/conventions/2148_telecommunications/index.ts +1 -0
- package/src/modeles/conventions/2148_telecommunications/seniority.ts +40 -0
- package/src/modeles/conventions/index.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.102.1](https://github.com/SocialGouv/code-du-travail-numerique/compare/v4.102.0...v4.102.1) (2023-06-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @socialgouv/modeles-social
|
|
9
|
+
|
|
10
|
+
# [4.102.0](https://github.com/SocialGouv/code-du-travail-numerique/compare/v4.101.3...v4.102.0) (2023-06-20)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- **indemnite-licenciement:** ne pas inclure les années incomplètes pour le calcul de l'ancienneté CC 2148 ([#5206](https://github.com/SocialGouv/code-du-travail-numerique/issues/5206)) ([565c767](https://github.com/SocialGouv/code-du-travail-numerique/commit/565c7674b8aff534e5abe91017006ea2c09e477d))
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
- indemnite licenciement 1404 ([#5133](https://github.com/SocialGouv/code-du-travail-numerique/issues/5133)) ([5fa2153](https://github.com/SocialGouv/code-du-travail-numerique/commit/5fa215383e48e04431817a28a7b5f9603f2b385d))
|
|
19
|
+
- **indemnite-licenciement:** activation de nouvelles CCs ([eeab2b4](https://github.com/SocialGouv/code-du-travail-numerique/commit/eeab2b4ff4c8b49ae783cc2327d422eb7119e6e2))
|
|
20
|
+
- **indemnite-licenciement:** désactivation de la CC 2596 ([04b6df4](https://github.com/SocialGouv/code-du-travail-numerique/commit/04b6df432e1bf97bcb8e5c2f3d2722d068960def))
|
|
21
|
+
|
|
22
|
+
## [4.101.3](https://github.com/SocialGouv/code-du-travail-numerique/compare/v4.101.2...v4.101.3) (2023-06-12)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @socialgouv/modeles-social
|
|
25
|
+
|
|
6
26
|
## [4.101.2](https://github.com/SocialGouv/code-du-travail-numerique/compare/v4.101.1...v4.101.2) (2023-06-12)
|
|
7
27
|
|
|
8
28
|
**Note:** Version bump only for package @socialgouv/modeles-social
|
|
@@ -53,6 +53,8 @@ var SeniorityFactory = /** @class */ (function () {
|
|
|
53
53
|
return new conventions_1.Seniority1597();
|
|
54
54
|
case index_1.SupportedCcIndemniteLicenciement.IDCC275:
|
|
55
55
|
return new conventions_1.Seniority275();
|
|
56
|
+
case index_1.SupportedCcIndemniteLicenciement.IDCC1404:
|
|
57
|
+
return new conventions_1.Seniority1404();
|
|
56
58
|
case index_1.SupportedCcIndemniteLicenciement.IDCC1606:
|
|
57
59
|
return new conventions_1.Seniority1606();
|
|
58
60
|
case index_1.SupportedCcIndemniteLicenciement.IDCC1672:
|
|
@@ -63,6 +65,8 @@ var SeniorityFactory = /** @class */ (function () {
|
|
|
63
65
|
return new conventions_1.Seniority1702();
|
|
64
66
|
case index_1.SupportedCcIndemniteLicenciement.IDCC1740:
|
|
65
67
|
return new conventions_1.Seniority1740();
|
|
68
|
+
case index_1.SupportedCcIndemniteLicenciement.IDCC2148:
|
|
69
|
+
return new conventions_1.Seniority2148();
|
|
66
70
|
case index_1.SupportedCcIndemniteLicenciement.default:
|
|
67
71
|
default:
|
|
68
72
|
return new base_1.SeniorityLegal();
|
|
@@ -42,6 +42,7 @@ var SupportedCcIndemniteLicenciement;
|
|
|
42
42
|
SupportedCcIndemniteLicenciement["IDCC2614"] = "2614";
|
|
43
43
|
SupportedCcIndemniteLicenciement["IDCC1266"] = "1266";
|
|
44
44
|
SupportedCcIndemniteLicenciement["IDCC275"] = "275";
|
|
45
|
+
SupportedCcIndemniteLicenciement["IDCC1404"] = "1404";
|
|
45
46
|
SupportedCcIndemniteLicenciement["IDCC1043"] = "1043";
|
|
46
47
|
SupportedCcIndemniteLicenciement["IDCC1672"] = "1672";
|
|
47
48
|
SupportedCcIndemniteLicenciement["IDCC0086"] = "86";
|
|
@@ -53,7 +54,7 @@ var SupportedCcIndemniteLicenciement;
|
|
|
53
54
|
exports.INDEMNITE_LICENCIEMENT_PRODUCTION_READY_CC = [
|
|
54
55
|
16, 29, 44, 413, 573, 650, 1090, 1351, 1486, 1501, 1518, 1527, 1596, 1597,
|
|
55
56
|
1979, 2216, 2264, 2941, 3043, 3127, 3239, 1517, 2098, 2511, 2609, 787, 843,
|
|
56
|
-
675, 1996, 1505, 1147, 1702,
|
|
57
|
+
675, 1996, 1505, 1147, 1702, 1266, 1672, 275, 86, 2614,
|
|
57
58
|
];
|
|
58
59
|
var getSupportedAgreement = function (idcc) {
|
|
59
60
|
for (var _i = 0, _a = Object.values(SupportedCcIndemniteLicenciement); _i < _a.length; _i++) {
|
package/bin/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/anciennete.spec.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/bin/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/anciennete.spec.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
var common_1 = require("../../../../common");
|
|
8
|
+
describe("CC 1404", function () {
|
|
9
|
+
describe("Calcul de l'ancienneté pour un non cadre", function () {
|
|
10
|
+
test.each(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n absences | entryDate | exitDate | expectedAnciennete\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n "], ["\n absences | entryDate | exitDate | expectedAnciennete\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n "])), [], "20/02/2020", "20/02/2021", 1, [{ durationInMonth: 1, motif: { key: common_1.MotifKeys.maladieNonPro, value: 1 }, startedAt: "20/04/2020" }], "20/02/2020", "20/02/2021", 1, [{ durationInMonth: 5, motif: { key: common_1.MotifKeys.maladieNonPro, value: 1 }, startedAt: "20/04/2020" }], "20/02/2020", "20/02/2021", 10 / 12, [{ durationInMonth: 2, motif: { key: common_1.MotifKeys.maladieNonPro, value: 1 }, startedAt: "01/03/2020" }, { durationInMonth: 2, motif: { key: common_1.MotifKeys.maladieNonPro, value: 1 }, startedAt: "01/10/2020" }], "01/08/2020", "01/08/2021", 11 / 12)("Calcul de l'ancienneté avec $entryDate et $exitDate en attendant $expectedAnciennete an", function (_a) {
|
|
11
|
+
var absences = _a.absences, entryDate = _a.entryDate, exitDate = _a.exitDate, expectedAnciennete = _a.expectedAnciennete;
|
|
12
|
+
var seniority = new common_1.SeniorityFactory().create(common_1.SupportedCcIndemniteLicenciement.IDCC1404);
|
|
13
|
+
var result = seniority.computeSeniority({
|
|
14
|
+
absencePeriods: absences,
|
|
15
|
+
dateEntree: entryDate,
|
|
16
|
+
dateSortie: exitDate,
|
|
17
|
+
});
|
|
18
|
+
expect(result.value).toEqual(expectedAnciennete);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
var templateObject_1;
|
package/bin/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/formule.spec.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var publicodes_1 = require("../../../../../publicodes");
|
|
4
|
+
var engine = new publicodes_1.IndemniteLicenciementPublicodes(modelsIndemniteLicenciement, "1404");
|
|
5
|
+
describe("Calcul de l'indemnité de licenciement pour CC 1404", function () {
|
|
6
|
+
describe("CDI classique", function () {
|
|
7
|
+
test.each([
|
|
8
|
+
{
|
|
9
|
+
expectedExplanations: [
|
|
10
|
+
"A : Ancienneté totale (≈ 0.67 an : valeur arrondie)",
|
|
11
|
+
"Sref : Salaire de référence (3000 €)",
|
|
12
|
+
],
|
|
13
|
+
expectedFormula: "1/4 * Sref * A",
|
|
14
|
+
seniority: 8 / 12,
|
|
15
|
+
seniorityRight: 8 / 12,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
expectedExplanations: [
|
|
19
|
+
"A1 : Ancienneté jusqu'à 10 ans (10 ans)",
|
|
20
|
+
"A2 : Ancienneté au-delà de 10 ans (2 ans)",
|
|
21
|
+
"Sref : Salaire de référence (3000 €)",
|
|
22
|
+
],
|
|
23
|
+
expectedFormula: "(1/4 * Sref * A1) + (1/3 * Sref * A2)",
|
|
24
|
+
seniority: 12,
|
|
25
|
+
seniorityRight: 12,
|
|
26
|
+
},
|
|
27
|
+
])("Avec une ancienneté $seniority ans (plus $seniorityEmployeTAM en tant que non cadre), droit de retraite: $haveRightToRetirement, un salaire de référence $salaireRef € et un age de $age => une compensation de base de $expectedCompensation €", function (_a) {
|
|
28
|
+
var seniorityRight = _a.seniorityRight, expectedExplanations = _a.expectedExplanations, expectedFormula = _a.expectedFormula, seniority = _a.seniority;
|
|
29
|
+
engine.setSituation({
|
|
30
|
+
"contrat salarié . convention collective": "'IDCC1404'",
|
|
31
|
+
"contrat salarié . convention collective . sedima . question cdi opération": "'Non'",
|
|
32
|
+
"contrat salarié . indemnité de licenciement . ancienneté conventionnelle en année": seniority.toString(),
|
|
33
|
+
"contrat salarié . indemnité de licenciement . ancienneté conventionnelle requise en année": seniorityRight.toString(),
|
|
34
|
+
"contrat salarié . indemnité de licenciement . salaire de référence conventionnel": "3000",
|
|
35
|
+
}, "contrat salarié . indemnité de licenciement . résultat conventionnel");
|
|
36
|
+
var formule = engine.getFormule();
|
|
37
|
+
expect(formule.formula).toEqual(expectedFormula);
|
|
38
|
+
expect(formule.explanations).toEqual(expectedExplanations);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
describe("CDI opération", function () {
|
|
42
|
+
describe("moins de 6 mois", function () {
|
|
43
|
+
test.each([
|
|
44
|
+
{
|
|
45
|
+
expectedExplanations: [
|
|
46
|
+
"Sref : Total des salaires bruts perçus depuis le début de l'engagement (3000 €)",
|
|
47
|
+
],
|
|
48
|
+
expectedFormula: "(10% * Sref)",
|
|
49
|
+
seniority: 0.25,
|
|
50
|
+
seniorityRight: 0.25,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
expectedExplanations: [
|
|
54
|
+
"Sref : Total des salaires bruts perçus depuis le début de l'engagement (3000 €)",
|
|
55
|
+
],
|
|
56
|
+
expectedFormula: "(10% * Sref)",
|
|
57
|
+
seniority: 0.41,
|
|
58
|
+
seniorityRight: 0.41,
|
|
59
|
+
},
|
|
60
|
+
])("Avec une ancienneté $seniority ans (plus $seniorityEmployeTAM en tant que non cadre), droit de retraite: $haveRightToRetirement, un salaire de référence $salaireRef € et un age de $age => une compensation de base de $expectedCompensation €", function (_a) {
|
|
61
|
+
var seniorityRight = _a.seniorityRight, expectedExplanations = _a.expectedExplanations, expectedFormula = _a.expectedFormula, seniority = _a.seniority;
|
|
62
|
+
engine.setSituation({
|
|
63
|
+
"contrat salarié . convention collective": "'IDCC1404'",
|
|
64
|
+
"contrat salarié . convention collective . sedima . cdi opération . moins de 6 mois . question période essai": "'Non'",
|
|
65
|
+
"contrat salarié . convention collective . sedima . cdi opération . moins de 6 mois . salaires total": "3000",
|
|
66
|
+
"contrat salarié . convention collective . sedima . question cdi opération": "'Oui'",
|
|
67
|
+
"contrat salarié . indemnité de licenciement . ancienneté conventionnelle en année": seniority.toString(),
|
|
68
|
+
"contrat salarié . indemnité de licenciement . ancienneté conventionnelle requise en année": seniorityRight.toString(),
|
|
69
|
+
}, "contrat salarié . indemnité de licenciement . résultat conventionnel");
|
|
70
|
+
var formule = engine.getFormule();
|
|
71
|
+
expect(formule.formula).toEqual(expectedFormula);
|
|
72
|
+
expect(formule.explanations).toEqual(expectedExplanations);
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
describe("plus de 6 mois", function () {
|
|
76
|
+
test.each([
|
|
77
|
+
{
|
|
78
|
+
expectedExplanations: [
|
|
79
|
+
"Sref : Total des salaires bruts perçus pendant la 1ère année du contrat (3000 €)",
|
|
80
|
+
],
|
|
81
|
+
expectedFormula: "(8% * Sref)",
|
|
82
|
+
seniority: 0.67,
|
|
83
|
+
seniorityRight: 0.67,
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
expectedExplanations: [
|
|
87
|
+
"Sref1 : Total des salaires bruts perçus pendant la 1ère année du contrat (3000 €)",
|
|
88
|
+
"Sref2 : Total des salaires bruts perçus pendant la 2ème année du contrat (3000 €)",
|
|
89
|
+
],
|
|
90
|
+
expectedFormula: "(8% * Sref1) + (6% * Sref2)",
|
|
91
|
+
seniority: 1.67,
|
|
92
|
+
seniorityRight: 1.67,
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
expectedExplanations: [
|
|
96
|
+
"Sref1 : Total des salaires bruts perçus pendant la 1ère année du contrat (3000 €)",
|
|
97
|
+
"Sref2 : Total des salaires bruts perçus pendant la 2ème année du contrat (3000 €)",
|
|
98
|
+
"Sref3 : Total des salaires bruts perçus de la 3ème année jusqu'à la fin du contrat (3000 €)",
|
|
99
|
+
],
|
|
100
|
+
expectedFormula: "(8% * Sref1) + (6% * Sref2) + (4% * Sref3)",
|
|
101
|
+
seniority: 2.67,
|
|
102
|
+
seniorityRight: 2.67,
|
|
103
|
+
},
|
|
104
|
+
])("Avec une ancienneté $seniority ans (plus $seniorityEmployeTAM en tant que non cadre), droit de retraite: $haveRightToRetirement, un salaire de référence $salaireRef € et un age de $age => une compensation de base de $expectedCompensation €", function (_a) {
|
|
105
|
+
var seniorityRight = _a.seniorityRight, expectedExplanations = _a.expectedExplanations, expectedFormula = _a.expectedFormula, seniority = _a.seniority;
|
|
106
|
+
engine.setSituation({
|
|
107
|
+
"contrat salarié . convention collective": "'IDCC1404'",
|
|
108
|
+
"contrat salarié . convention collective . sedima . cdi opération . durée": (seniorityRight * 12).toString(),
|
|
109
|
+
"contrat salarié . convention collective . sedima . cdi opération . plus de 6 mois . salaires 1e année": "3000",
|
|
110
|
+
"contrat salarié . convention collective . sedima . cdi opération . plus de 6 mois . salaires 2e année": "3000",
|
|
111
|
+
"contrat salarié . convention collective . sedima . cdi opération . plus de 6 mois . salaires 3e année et plus": "3000",
|
|
112
|
+
"contrat salarié . convention collective . sedima . question cdi opération": "'Oui'",
|
|
113
|
+
"contrat salarié . indemnité de licenciement . ancienneté conventionnelle en année": seniority.toString(),
|
|
114
|
+
"contrat salarié . indemnité de licenciement . ancienneté conventionnelle requise en année": seniorityRight.toString(),
|
|
115
|
+
}, "contrat salarié . indemnité de licenciement . résultat conventionnel");
|
|
116
|
+
var formule = engine.getFormule();
|
|
117
|
+
expect(formule.formula).toEqual(expectedFormula);
|
|
118
|
+
expect(formule.explanations).toEqual(expectedExplanations);
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
});
|
package/bin/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/indemnite.spec.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/bin/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/indemnite.spec.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
var publicodes_1 = require("../../../../../publicodes");
|
|
19
|
+
var engine = new publicodes_1.IndemniteLicenciementPublicodes(modelsIndemniteLicenciement, "1404");
|
|
20
|
+
describe("Calcul de l'indemnité de licenciement pour CC 1404", function () {
|
|
21
|
+
describe("CDI classique", function () {
|
|
22
|
+
test.each(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n seniorityRight | seniority | salaireRef | expectedCompensation\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n "], ["\n seniorityRight | seniority | salaireRef | expectedCompensation\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n "])), 8 / 12, 8 / 12, 2400, 400, 20.58, 20.58, 1896, 11426.56)("Avec une ancienneté $seniority ans (plus $seniorityEmployeTAM en tant que non cadre), droit de retraite: $haveRightToRetirement, un salaire de référence $salaireRef € et un age de $age => une compensation de base de $expectedCompensation €", function (_a) {
|
|
23
|
+
var _b;
|
|
24
|
+
var seniorityRight = _a.seniorityRight, salaireRef = _a.salaireRef, expectedCompensation = _a.expectedCompensation, seniority = _a.seniority;
|
|
25
|
+
var _c = engine.setSituation({
|
|
26
|
+
"contrat salarié . convention collective": "'IDCC1404'",
|
|
27
|
+
"contrat salarié . convention collective . sedima . question cdi opération": "'Non'",
|
|
28
|
+
"contrat salarié . indemnité de licenciement . ancienneté conventionnelle en année": seniority,
|
|
29
|
+
"contrat salarié . indemnité de licenciement . ancienneté conventionnelle requise en année": seniorityRight,
|
|
30
|
+
"contrat salarié . indemnité de licenciement . salaire de référence conventionnel": salaireRef,
|
|
31
|
+
}, "contrat salarié . indemnité de licenciement . résultat conventionnel"), missingArgs = _c.missingArgs, result = _c.result;
|
|
32
|
+
expect(missingArgs).toEqual([]);
|
|
33
|
+
expect(result.value).toEqual(expectedCompensation);
|
|
34
|
+
expect((_b = result.unit) === null || _b === void 0 ? void 0 : _b.numerators).toEqual(["€"]);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
describe("CDI opération", function () {
|
|
38
|
+
describe("moins de 6 mois", function () {
|
|
39
|
+
test.each(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n seniorityRight | seniority | salaireRef | expectedCompensation | beforeTrial\n ", " | ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", " | ", "\n "], ["\n seniorityRight | seniority | salaireRef | expectedCompensation | beforeTrial\n ", " | ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", " | ", "\n "])), 0, 0, 20136, 0, "'Oui'", 5 / 12, 5 / 12, 20136, 2013.6, "'Non'")("Avec une ancienneté $seniority ans (plus $seniorityEmployeTAM en tant que non cadre), droit de retraite: $haveRightToRetirement, un salaire de référence $salaireRef € et un age de $age => une compensation de base de $expectedCompensation €", function (_a) {
|
|
40
|
+
var _b;
|
|
41
|
+
var seniorityRight = _a.seniorityRight, salaireRef = _a.salaireRef, expectedCompensation = _a.expectedCompensation, seniority = _a.seniority, beforeTrial = _a.beforeTrial;
|
|
42
|
+
var _c = engine.setSituation({
|
|
43
|
+
"contrat salarié . convention collective": "'IDCC1404'",
|
|
44
|
+
"contrat salarié . convention collective . sedima . cdi opération . durée": (seniorityRight * 12).toString(),
|
|
45
|
+
"contrat salarié . convention collective . sedima . cdi opération . moins de 6 mois . question période essai": beforeTrial,
|
|
46
|
+
"contrat salarié . convention collective . sedima . cdi opération . moins de 6 mois . salaires total": salaireRef,
|
|
47
|
+
"contrat salarié . convention collective . sedima . question cdi opération": "'Oui'",
|
|
48
|
+
"contrat salarié . indemnité de licenciement . ancienneté conventionnelle en année": seniority,
|
|
49
|
+
"contrat salarié . indemnité de licenciement . ancienneté conventionnelle requise en année": seniorityRight,
|
|
50
|
+
}, "contrat salarié . indemnité de licenciement . résultat conventionnel"), missingArgs = _c.missingArgs, result = _c.result;
|
|
51
|
+
expect(missingArgs).toEqual([]);
|
|
52
|
+
expect(result.value).toEqual(expectedCompensation);
|
|
53
|
+
expect((_b = result.unit) === null || _b === void 0 ? void 0 : _b.numerators).toEqual(["€"]);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
describe("plus de 6 mois", function () {
|
|
57
|
+
test.each(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n seniorityRight | seniority | salaire1 | salaire2 | salaire3 | expectedCompensation\n ", " | ", " | ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", " | ", " | ", "\n "], ["\n seniorityRight | seniority | salaire1 | salaire2 | salaire3 | expectedCompensation\n ", " | ", " | ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", " | ", " | ", "\n "])), 0.5, 0.5, 20296, undefined, undefined, 1623.68, 2.5, 2.5, 29899, 29834, 15297, 4793.84)("Avec une ancienneté $seniority ans (plus $seniorityEmployeTAM en tant que non cadre), droit de retraite: $haveRightToRetirement, un salaire de référence $salaireRef € et un age de $age => une compensation de base de $expectedCompensation €", function (_a) {
|
|
58
|
+
var _b;
|
|
59
|
+
var seniorityRight = _a.seniorityRight, salaire1 = _a.salaire1, salaire2 = _a.salaire2, salaire3 = _a.salaire3, expectedCompensation = _a.expectedCompensation, seniority = _a.seniority;
|
|
60
|
+
var salarySituation = {
|
|
61
|
+
"contrat salarié . convention collective . sedima . cdi opération . plus de 6 mois . salaires 1e année": salaire1,
|
|
62
|
+
};
|
|
63
|
+
if (salaire2) {
|
|
64
|
+
salarySituation["contrat salarié . convention collective . sedima . cdi opération . plus de 6 mois . salaires 2e année"] = salaire2;
|
|
65
|
+
}
|
|
66
|
+
if (salaire3) {
|
|
67
|
+
salarySituation["contrat salarié . convention collective . sedima . cdi opération . plus de 6 mois . salaires 3e année et plus"] = salaire3;
|
|
68
|
+
}
|
|
69
|
+
var _c = engine.setSituation(__assign(__assign({}, salarySituation), { "contrat salarié . convention collective": "'IDCC1404'", "contrat salarié . convention collective . sedima . cdi opération . durée": (seniorityRight * 12).toString(), "contrat salarié . convention collective . sedima . question cdi opération": "'Oui'", "contrat salarié . indemnité de licenciement . ancienneté conventionnelle en année": seniority, "contrat salarié . indemnité de licenciement . ancienneté conventionnelle requise en année": seniorityRight }), "contrat salarié . indemnité de licenciement . résultat conventionnel"), missingArgs = _c.missingArgs, result = _c.result;
|
|
70
|
+
console.log(result);
|
|
71
|
+
expect(missingArgs).toEqual([]);
|
|
72
|
+
expect(result.value).toEqual(expectedCompensation);
|
|
73
|
+
expect((_b = result.unit) === null || _b === void 0 ? void 0 : _b.numerators).toEqual(["€"]);
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
package/bin/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/missing-args.spec.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/bin/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/missing-args.spec.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var publicodes_1 = require("../../../../../publicodes");
|
|
4
|
+
var engine = new publicodes_1.IndemniteLicenciementPublicodes(modelsIndemniteLicenciement, "1404");
|
|
5
|
+
describe("CC 1404 - Affiche les questions", function () {
|
|
6
|
+
it("doit demander le cdi d'opération", function () {
|
|
7
|
+
var result = engine.setSituation({
|
|
8
|
+
"contrat salarié . convention collective": "'IDCC1404'",
|
|
9
|
+
}, "contrat salarié . indemnité de licenciement . résultat conventionnel");
|
|
10
|
+
expect(getFirstMissing(result.missingArgs)).toEqual("contrat salarié . convention collective . sedima . question cdi opération");
|
|
11
|
+
});
|
|
12
|
+
it("doit demander l'impossibilité de mission", function () {
|
|
13
|
+
var result = engine.setSituation({
|
|
14
|
+
"contrat salarié . convention collective": "'IDCC1404'",
|
|
15
|
+
"contrat salarié . convention collective . sedima . question cdi opération": "'Oui'",
|
|
16
|
+
}, "contrat salarié . indemnité de licenciement . résultat conventionnel");
|
|
17
|
+
expect(getFirstMissing(result.missingArgs)).toEqual("contrat salarié . convention collective . sedima . cdi opération . durée");
|
|
18
|
+
});
|
|
19
|
+
it("doit demander période d'essai", function () {
|
|
20
|
+
var result = engine.setSituation({
|
|
21
|
+
"contrat salarié . convention collective": "'IDCC1404'",
|
|
22
|
+
"contrat salarié . convention collective . sedima . cdi opération . durée": "5",
|
|
23
|
+
"contrat salarié . convention collective . sedima . question cdi opération": "'Oui'",
|
|
24
|
+
}, "contrat salarié . indemnité de licenciement . résultat conventionnel");
|
|
25
|
+
expect(getFirstMissing(result.missingArgs)).toEqual("contrat salarié . convention collective . sedima . cdi opération . moins de 6 mois . question période essai");
|
|
26
|
+
});
|
|
27
|
+
it("doit demander le salaire total", function () {
|
|
28
|
+
var result = engine.setSituation({
|
|
29
|
+
"contrat salarié . convention collective": "'IDCC1404'",
|
|
30
|
+
"contrat salarié . convention collective . sedima . cdi opération . durée": "5",
|
|
31
|
+
"contrat salarié . convention collective . sedima . cdi opération . moins de 6 mois . question période essai": "'Non'",
|
|
32
|
+
"contrat salarié . convention collective . sedima . question cdi opération": "'Oui'",
|
|
33
|
+
}, "contrat salarié . indemnité de licenciement . résultat conventionnel");
|
|
34
|
+
expect(getFirstMissing(result.missingArgs)).toEqual("contrat salarié . convention collective . sedima . cdi opération . moins de 6 mois . salaires total");
|
|
35
|
+
});
|
|
36
|
+
it("doit demander le salaire de la 1ère année", function () {
|
|
37
|
+
var result = engine.setSituation({
|
|
38
|
+
"contrat salarié . convention collective": "'IDCC1404'",
|
|
39
|
+
"contrat salarié . convention collective . sedima . cdi opération . durée": "6",
|
|
40
|
+
"contrat salarié . convention collective . sedima . question cdi opération": "'Oui'",
|
|
41
|
+
}, "contrat salarié . indemnité de licenciement . résultat conventionnel");
|
|
42
|
+
expect(getFirstMissing(result.missingArgs)).toEqual("contrat salarié . convention collective . sedima . cdi opération . plus de 6 mois . salaires 1e année");
|
|
43
|
+
});
|
|
44
|
+
it("doit demander le salaire de la 2ème année", function () {
|
|
45
|
+
var result = engine.setSituation({
|
|
46
|
+
"contrat salarié . convention collective": "'IDCC1404'",
|
|
47
|
+
"contrat salarié . convention collective . sedima . cdi opération . durée": "18",
|
|
48
|
+
"contrat salarié . convention collective . sedima . cdi opération . plus de 6 mois . salaires 1e année": "3000",
|
|
49
|
+
"contrat salarié . convention collective . sedima . question cdi opération": "'Oui'",
|
|
50
|
+
}, "contrat salarié . indemnité de licenciement . résultat conventionnel");
|
|
51
|
+
expect(getFirstMissing(result.missingArgs)).toEqual("contrat salarié . convention collective . sedima . cdi opération . plus de 6 mois . salaires 2e année");
|
|
52
|
+
});
|
|
53
|
+
it("doit demander le salaire de la 3ème année et plus", function () {
|
|
54
|
+
var result = engine.setSituation({
|
|
55
|
+
"contrat salarié . convention collective": "'IDCC1404'",
|
|
56
|
+
"contrat salarié . convention collective . sedima . cdi opération . durée": "30",
|
|
57
|
+
"contrat salarié . convention collective . sedima . cdi opération . plus de 6 mois . salaires 1e année": "3000",
|
|
58
|
+
"contrat salarié . convention collective . sedima . cdi opération . plus de 6 mois . salaires 2e année": "3000",
|
|
59
|
+
"contrat salarié . convention collective . sedima . question cdi opération": "'Oui'",
|
|
60
|
+
}, "contrat salarié . indemnité de licenciement . résultat conventionnel");
|
|
61
|
+
expect(getFirstMissing(result.missingArgs)).toEqual("contrat salarié . convention collective . sedima . cdi opération . plus de 6 mois . salaires 3e année et plus");
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
var getFirstMissing = function (missingVariables) {
|
|
65
|
+
var missingVars = missingVariables
|
|
66
|
+
.filter(function (arg) { return arg.rawNode.cdtn !== undefined; })
|
|
67
|
+
.sort(function (a, b) { return b.indice - a.indice; });
|
|
68
|
+
if (missingVars.length === 0) {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
return replaceAll(missingVars[0].name, " - ", " . ");
|
|
72
|
+
};
|
|
73
|
+
var replaceAll = function (string, search, replace) {
|
|
74
|
+
return string.split(search).join(replace);
|
|
75
|
+
};
|
package/bin/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/references.spec.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/bin/modeles/conventions/1404_sedima/__tests__/indemnite-licenciement/references.spec.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
var publicodes_1 = require("../../../../../publicodes");
|
|
19
|
+
var engine = new publicodes_1.IndemniteLicenciementPublicodes(modelsIndemniteLicenciement, "1404");
|
|
20
|
+
describe("Vérification des références juridiques pour la CC 1404", function () {
|
|
21
|
+
describe("CDI classique", function () {
|
|
22
|
+
var references = [
|
|
23
|
+
{
|
|
24
|
+
article: "Article 3.42",
|
|
25
|
+
url: "https://www.legifrance.gouv.fr/conv_coll/article/KALIARTI000039412125?idConteneur=KALICONT000005635653",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
article: "Article 6.51",
|
|
29
|
+
url: "https://www.legifrance.gouv.fr/conv_coll/article/KALIARTI000039412129?idConteneur=KALICONT000005635653",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
article: "Article 0.21",
|
|
33
|
+
url: "https://www.legifrance.gouv.fr/conv_coll/article/KALIARTI000026355951?idConteneur=KALICONT000005635653&origin=list#KALIARTI000026355951",
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
test.each(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n seniorityRight | seniority | salaireRef\n ", " | ", " | ", "\n "], ["\n seniorityRight | seniority | salaireRef\n ", " | ", " | ", "\n "])), 8 / 12, 8 / 12, 2400)("Avec une ancienneté $seniority ans (plus $seniorityEmployeTAM en tant que non cadre), droit de retraite: $haveRightToRetirement, un salaire de référence $salaireRef € et un age de $age => une compensation de base de $expectedCompensation €", function (_a) {
|
|
37
|
+
var seniorityRight = _a.seniorityRight, salaireRef = _a.salaireRef, seniority = _a.seniority;
|
|
38
|
+
engine.setSituation({
|
|
39
|
+
"contrat salarié . convention collective": "'IDCC1404'",
|
|
40
|
+
"contrat salarié . convention collective . sedima . question cdi opération": "'Non'",
|
|
41
|
+
"contrat salarié . indemnité de licenciement . ancienneté conventionnelle en année": seniority,
|
|
42
|
+
"contrat salarié . indemnité de licenciement . ancienneté conventionnelle requise en année": seniorityRight,
|
|
43
|
+
"contrat salarié . indemnité de licenciement . salaire de référence conventionnel": salaireRef,
|
|
44
|
+
}, "contrat salarié . indemnité de licenciement . résultat conventionnel");
|
|
45
|
+
var result = engine.getReferences("résultat conventionnel");
|
|
46
|
+
expect(result).toHaveLength(references.length);
|
|
47
|
+
expect(result).toEqual(expect.arrayContaining(references));
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
describe("CDI opération", function () {
|
|
51
|
+
describe("Mission impossible", function () {
|
|
52
|
+
var references = [
|
|
53
|
+
{
|
|
54
|
+
article: "Article 4 de l'accord du 5 juillet 2019",
|
|
55
|
+
url: "https://www.legifrance.gouv.fr/conv_coll/article/KALIARTI000041459011?idConteneur=KALICONT000005635653",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
article: "Article 0.21",
|
|
59
|
+
url: "https://www.legifrance.gouv.fr/conv_coll/article/KALIARTI000026355951?idConteneur=KALICONT000005635653&origin=list#KALIARTI000026355951",
|
|
60
|
+
},
|
|
61
|
+
];
|
|
62
|
+
test.each(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n seniorityRight | seniority | salaireRef\n ", " | ", " | ", "\n ", " | ", " | ", "\n "], ["\n seniorityRight | seniority | salaireRef\n ", " | ", " | ", "\n ", " | ", " | ", "\n "])), 0.25, 0.25, 7749, 0.41, 0.41, 12280)("Avec une ancienneté $seniority ans (plus $seniorityEmployeTAM en tant que non cadre), droit de retraite: $haveRightToRetirement, un salaire de référence $salaireRef € et un age de $age => une compensation de base de $expectedCompensation €", function (_a) {
|
|
63
|
+
var seniorityRight = _a.seniorityRight, salaireRef = _a.salaireRef, seniority = _a.seniority;
|
|
64
|
+
engine.setSituation({
|
|
65
|
+
"contrat salarié . convention collective": "'IDCC1404'",
|
|
66
|
+
"contrat salarié . convention collective . sedima . cdi opération . durée": "5",
|
|
67
|
+
"contrat salarié . convention collective . sedima . cdi opération . moins de 6 mois . question période essai": "'Non'",
|
|
68
|
+
"contrat salarié . convention collective . sedima . cdi opération . moins de 6 mois . salaires total": salaireRef,
|
|
69
|
+
"contrat salarié . convention collective . sedima . question cdi opération": "'Oui'",
|
|
70
|
+
"contrat salarié . indemnité de licenciement . ancienneté conventionnelle en année": seniority,
|
|
71
|
+
"contrat salarié . indemnité de licenciement . ancienneté conventionnelle requise en année": seniorityRight,
|
|
72
|
+
}, "contrat salarié . indemnité de licenciement . résultat conventionnel");
|
|
73
|
+
var result = engine.getReferences("résultat conventionnel");
|
|
74
|
+
expect(result).toHaveLength(references.length);
|
|
75
|
+
expect(result).toEqual(expect.arrayContaining(references));
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
describe("Mission possible", function () {
|
|
79
|
+
var references = [
|
|
80
|
+
{
|
|
81
|
+
article: "Article 3 de l’accord du 5 juillet 2019",
|
|
82
|
+
url: "https://www.legifrance.gouv.fr/conv_coll/article/KALIARTI000041459010?idConteneur=KALICONT000005635653",
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
article: "Article 0.21",
|
|
86
|
+
url: "https://www.legifrance.gouv.fr/conv_coll/article/KALIARTI000026355951?idConteneur=KALICONT000005635653&origin=list#KALIARTI000026355951",
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
test.each(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n seniorityRight | seniority | salaire1 | salaire2 | salaire3\n ", " | ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", " | ", "\n "], ["\n seniorityRight | seniority | salaire1 | salaire2 | salaire3\n ", " | ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", " | ", "\n "])), 0.67, 0.67, 20296, undefined, undefined, 2.5, 2.5, 29899, 29834, 15297)("Avec une ancienneté $seniority ans (plus $seniorityEmployeTAM en tant que non cadre), droit de retraite: $haveRightToRetirement, un salaire de référence $salaireRef € et un age de $age => une compensation de base de $expectedCompensation €", function (_a) {
|
|
90
|
+
var seniorityRight = _a.seniorityRight, salaire1 = _a.salaire1, salaire2 = _a.salaire2, salaire3 = _a.salaire3, seniority = _a.seniority;
|
|
91
|
+
var salarySituation = {
|
|
92
|
+
"contrat salarié . convention collective . sedima . cdi opération . plus de 6 mois . salaires 1e année": salaire1,
|
|
93
|
+
};
|
|
94
|
+
if (salaire2) {
|
|
95
|
+
salarySituation["contrat salarié . convention collective . sedima . cdi opération . plus de 6 mois . salaires 2e année"] = salaire2;
|
|
96
|
+
}
|
|
97
|
+
if (salaire3) {
|
|
98
|
+
salarySituation["contrat salarié . convention collective . sedima . cdi opération . plus de 6 mois . salaires 3e année et plus"] = salaire3;
|
|
99
|
+
}
|
|
100
|
+
engine.setSituation(__assign(__assign({}, salarySituation), { "contrat salarié . convention collective": "'IDCC1404'", "contrat salarié . convention collective . sedima . cdi opération . durée": (seniorityRight * 12).toString(), "contrat salarié . convention collective . sedima . cdi opération . plus de 6 mois . salaires 1e année": "3000", "contrat salarié . convention collective . sedima . cdi opération . plus de 6 mois . salaires 2e année": "3000", "contrat salarié . convention collective . sedima . cdi opération . plus de 6 mois . salaires 3e année et plus": "3000", "contrat salarié . convention collective . sedima . question cdi opération": "'Oui'", "contrat salarié . indemnité de licenciement . ancienneté conventionnelle en année": seniority, "contrat salarié . indemnité de licenciement . ancienneté conventionnelle requise en année": seniorityRight }), "contrat salarié . indemnité de licenciement . résultat conventionnel");
|
|
101
|
+
var refs = engine.getReferences("résultat conventionnel");
|
|
102
|
+
expect(refs).toHaveLength(references.length);
|
|
103
|
+
expect(refs).toEqual(expect.arrayContaining(references));
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./seniority";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./seniority"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ISeniority, Motif, RequiredSeniorityResult, SeniorityProps, SeniorityRequiredProps, SeniorityResult, SupportedCcIndemniteLicenciement } from "../../common";
|
|
2
|
+
export declare class Seniority1404 implements ISeniority<SupportedCcIndemniteLicenciement.IDCC1404> {
|
|
3
|
+
computeSeniority({ dateEntree, dateSortie, absencePeriods, }: SeniorityProps<SupportedCcIndemniteLicenciement.IDCC1404>): SeniorityResult;
|
|
4
|
+
computeRequiredSeniority({ dateEntree, dateNotification, absencePeriods, }: SeniorityRequiredProps): RequiredSeniorityResult;
|
|
5
|
+
getMotifs(): Motif[];
|
|
6
|
+
private compute;
|
|
7
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.Seniority1404 = void 0;
|
|
15
|
+
var date_fns_1 = require("date-fns");
|
|
16
|
+
var seniority_1 = require("../../base/seniority");
|
|
17
|
+
var common_1 = require("../../common");
|
|
18
|
+
var motif_keys_1 = require("../../common/motif-keys");
|
|
19
|
+
var getTotalAbsenceNonPro = function (dEntree, dSortie, absencePeriods) {
|
|
20
|
+
var absences = absencePeriods.filter(function (item) { return item.motif.key === motif_keys_1.MotifKeys.maladieNonPro; });
|
|
21
|
+
var years = (0, common_1.splitBySeniorityCalendarYear)(dEntree, dSortie);
|
|
22
|
+
var absencesBySeniorityYear = (0, common_1.accumulateAbsenceByYear)(absences, years);
|
|
23
|
+
return absencesBySeniorityYear.reduce(function (total, item) {
|
|
24
|
+
return total + Math.max(item.totalAbsenceInMonth - 3, 0);
|
|
25
|
+
}, 0);
|
|
26
|
+
};
|
|
27
|
+
var Seniority1404 = /** @class */ (function () {
|
|
28
|
+
function Seniority1404() {
|
|
29
|
+
}
|
|
30
|
+
Seniority1404.prototype.computeSeniority = function (_a) {
|
|
31
|
+
var dateEntree = _a.dateEntree, dateSortie = _a.dateSortie, _b = _a.absencePeriods, absencePeriods = _b === void 0 ? [] : _b;
|
|
32
|
+
return this.compute(dateEntree, dateSortie, absencePeriods);
|
|
33
|
+
};
|
|
34
|
+
Seniority1404.prototype.computeRequiredSeniority = function (_a) {
|
|
35
|
+
var dateEntree = _a.dateEntree, dateNotification = _a.dateNotification, _b = _a.absencePeriods, absencePeriods = _b === void 0 ? [] : _b;
|
|
36
|
+
return this.compute(dateEntree, dateNotification, absencePeriods);
|
|
37
|
+
};
|
|
38
|
+
Seniority1404.prototype.getMotifs = function () {
|
|
39
|
+
return seniority_1.LEGAL_MOTIFS.map(function (item) {
|
|
40
|
+
if (item.key === motif_keys_1.MotifKeys.maladieNonPro) {
|
|
41
|
+
return __assign(__assign({}, item), { startAt: function () { return true; } });
|
|
42
|
+
}
|
|
43
|
+
return item;
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
Seniority1404.prototype.compute = function (from, to, absences) {
|
|
47
|
+
var _this = this;
|
|
48
|
+
var dEntree = (0, common_1.parseDate)(from);
|
|
49
|
+
var dSortie = (0, date_fns_1.addDays)((0, common_1.parseDate)(to), 1);
|
|
50
|
+
var totalAbsenceNonPro = getTotalAbsenceNonPro(dEntree, dSortie, absences);
|
|
51
|
+
var totalAbsence = absences.reduce(function (total, item) {
|
|
52
|
+
var m = _this.getMotifs().find(function (motif) { return motif.key === item.motif.key; });
|
|
53
|
+
if (item.durationInMonth === undefined || !m) {
|
|
54
|
+
return total;
|
|
55
|
+
}
|
|
56
|
+
if (item.motif.key === motif_keys_1.MotifKeys.maladieNonPro) {
|
|
57
|
+
return total;
|
|
58
|
+
}
|
|
59
|
+
return total + item.durationInMonth * m.value;
|
|
60
|
+
}, 0);
|
|
61
|
+
return {
|
|
62
|
+
value: ((0, date_fns_1.differenceInMonths)(dSortie, dEntree) -
|
|
63
|
+
totalAbsence -
|
|
64
|
+
totalAbsenceNonPro) /
|
|
65
|
+
12,
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
return Seniority1404;
|
|
69
|
+
}());
|
|
70
|
+
exports.Seniority1404 = Seniority1404;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|