softdinlibreriajs 12.0.35 → 12.0.36
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/package.json +1 -1
- package/src/EnumNivelRiesgo.js +49 -0
- package/src/EnumSexo.js +4 -0
package/package.json
CHANGED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
class EnumNivelRiesgo {
|
|
2
|
+
static RIESGO_I = 1;
|
|
3
|
+
static RIESGO_II = 2;
|
|
4
|
+
static RIESGO_III = 3;
|
|
5
|
+
static RIESGO_IV = 4;
|
|
6
|
+
static RIESGO_V = 5;
|
|
7
|
+
|
|
8
|
+
static descriptions = [
|
|
9
|
+
{
|
|
10
|
+
id: EnumNivelRiesgo.RIESGO_I,
|
|
11
|
+
code: 0.522,
|
|
12
|
+
description: "Riesgo I",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
id: EnumNivelRiesgo.RIESGO_II,
|
|
16
|
+
code: 1.044,
|
|
17
|
+
description: "Riesgo II",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: EnumNivelRiesgo.RIESGO_III,
|
|
21
|
+
code: 2.436,
|
|
22
|
+
description: "Riesgo III",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: EnumNivelRiesgo.RIESGO_IV,
|
|
26
|
+
code: 4.35,
|
|
27
|
+
description: "Riesgo IV",
|
|
28
|
+
},
|
|
29
|
+
{ id: EnumNivelRiesgo.RIESGO_V, code: 6.960, description: "Riesgo V" },
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
static getById(id) {
|
|
33
|
+
return EnumNivelRiesgo.descriptions.find((item) => item.id === id) || null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static getAll() {
|
|
37
|
+
return EnumNivelRiesgo.descriptions;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
static getByDescription(description) {
|
|
41
|
+
return (
|
|
42
|
+
EnumNivelRiesgo.descriptions.find(
|
|
43
|
+
(item) => item.description === description
|
|
44
|
+
) || null
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
module.exports = EnumNivelRiesgo;
|
package/src/EnumSexo.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
class EnumSexo {
|
|
2
2
|
static M = 1;
|
|
3
3
|
static F = 2;
|
|
4
|
+
static ND = 3;
|
|
5
|
+
static NDR = 4;
|
|
4
6
|
|
|
5
7
|
static descriptions = [
|
|
6
8
|
{ id: EnumSexo.M, code: 'M', description: 'Masculino' },
|
|
7
9
|
{ id: EnumSexo.F, code: 'F', description: 'Femenino' },
|
|
10
|
+
{ id: EnumSexo.ND, code: 'ND', description: 'No definido' },
|
|
11
|
+
{ id: EnumSexo.NDR, code: 'NDR', description: 'No deseo responder' }
|
|
8
12
|
];
|
|
9
13
|
|
|
10
14
|
static getById(id) {
|