softdinlibreriajs 12.0.36 → 12.0.38
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/EnumEstadoCivil.js +96 -53
- package/src/EnumModulos.js +60 -0
- package/src/EnumModuloNovedades.js +0 -48
package/package.json
CHANGED
package/src/EnumEstadoCivil.js
CHANGED
|
@@ -1,62 +1,105 @@
|
|
|
1
1
|
class EnumEstadoCivil {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
static descriptions = [
|
|
11
|
-
{ id: EnumEstadoCivil.SOLTERO, code: 'SOLTERO', description: 'Soltero(A)' },
|
|
12
|
-
{ id: EnumEstadoCivil.CASADO, code: 'CASADO', description: 'Casado(A)' },
|
|
13
|
-
{ id: EnumEstadoCivil.DIVORCIADO, code: 'DIVORCIADO', description: 'Divorciado(A)' },
|
|
14
|
-
{ id: EnumEstadoCivil.SEPARADO, code: 'SEPARADO', description: 'Separado(A)' },
|
|
15
|
-
{ id: EnumEstadoCivil.VIUDO, code: 'VIUDO', description: 'Viudo(A)' },
|
|
16
|
-
{ id: EnumEstadoCivil.UNION_LIBRE, code: 'UNION_LIBRE', description: 'Union Libre' },
|
|
17
|
-
{ id: EnumEstadoCivil.NO_DEFINIDO, code: 'NO_DEFINIDO', description: 'NO Definido' }
|
|
18
|
-
];
|
|
19
|
-
|
|
20
|
-
static getById(id) {
|
|
21
|
-
return EnumEstadoCivil.descriptions.find(item => item.id === id) || null;
|
|
22
|
-
}
|
|
2
|
+
static SOLTERO = 1;
|
|
3
|
+
static CASADO = 2;
|
|
4
|
+
static DIVORCIADO = 3;
|
|
5
|
+
static SEPARADO = 4;
|
|
6
|
+
static VIUDO = 5;
|
|
7
|
+
static UNION_LIBRE = 6;
|
|
8
|
+
static NO_DEFINIDO = 0;
|
|
23
9
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
10
|
+
static descriptions = [
|
|
11
|
+
{
|
|
12
|
+
id: EnumEstadoCivil.SOLTERO,
|
|
13
|
+
code: "SOLTERO",
|
|
14
|
+
description: "Soltero(A)",
|
|
15
|
+
descriptionIngles: "Single",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: EnumEstadoCivil.CASADO,
|
|
19
|
+
code: "CASADO",
|
|
20
|
+
description: "Casado(A)",
|
|
21
|
+
descriptionIngles: "Married",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: EnumEstadoCivil.DIVORCIADO,
|
|
25
|
+
code: "DIVORCIADO",
|
|
26
|
+
description: "Divorciado(A)",
|
|
27
|
+
descriptionIngles: "Divorced",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: EnumEstadoCivil.SEPARADO,
|
|
31
|
+
code: "SEPARADO",
|
|
32
|
+
description: "Separado(A)",
|
|
33
|
+
descriptionIngles: "Separated",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: EnumEstadoCivil.VIUDO,
|
|
37
|
+
code: "VIUDO",
|
|
38
|
+
description: "Viudo(A)",
|
|
39
|
+
descriptionIngles: "Widowed",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: EnumEstadoCivil.UNION_LIBRE,
|
|
43
|
+
code: "UNION_LIBRE",
|
|
44
|
+
description: "Union Libre",
|
|
45
|
+
descriptionIngles: "Common-law",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: EnumEstadoCivil.NO_DEFINIDO,
|
|
49
|
+
code: "NO_DEFINIDO",
|
|
50
|
+
description: "NO Definido",
|
|
51
|
+
descriptionIngles: "Not Defined",
|
|
52
|
+
},
|
|
53
|
+
];
|
|
27
54
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
55
|
+
static getById(id) {
|
|
56
|
+
return EnumEstadoCivil.descriptions.find((item) => item.id === id) || null;
|
|
57
|
+
}
|
|
31
58
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
'success': EnumEstadoCivil.DIVORCIADO,
|
|
36
|
-
'indigo': EnumEstadoCivil.SEPARADO,
|
|
37
|
-
'fuchsia': EnumEstadoCivil.VIUDO,
|
|
38
|
-
'emerald': EnumEstadoCivil.UNION_LIBRE,
|
|
39
|
-
'danger': EnumEstadoCivil.NO_DEFINIDO, // Default color for unknown states
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
static getColors(campo) {
|
|
43
|
-
const colorArray = {};
|
|
44
|
-
|
|
45
|
-
for (const [color, description] of Object.entries(EnumEstadoCalendario.colorMapping)) {
|
|
46
|
-
const descriptionEntry = EnumEstadoCalendario.descriptions.find(item => item.id === description);
|
|
47
|
-
if (descriptionEntry) {
|
|
48
|
-
colorArray[color] = descriptionEntry[campo];
|
|
49
|
-
} else {
|
|
50
|
-
colorArray[color] = null; // Manejar el caso en que el campo no exista
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return colorArray;
|
|
54
|
-
}
|
|
59
|
+
static getAll() {
|
|
60
|
+
return EnumEstadoCivil.descriptions;
|
|
61
|
+
}
|
|
55
62
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
63
|
+
static getByDescription(description) {
|
|
64
|
+
return (
|
|
65
|
+
EnumEstadoCivil.descriptions.find(
|
|
66
|
+
(item) => item.description === description
|
|
67
|
+
) || null
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
static colorMapping = {
|
|
72
|
+
primary: EnumEstadoCivil.SOLTERO,
|
|
73
|
+
warning: EnumEstadoCivil.CASADO,
|
|
74
|
+
success: EnumEstadoCivil.DIVORCIADO,
|
|
75
|
+
indigo: EnumEstadoCivil.SEPARADO,
|
|
76
|
+
fuchsia: EnumEstadoCivil.VIUDO,
|
|
77
|
+
emerald: EnumEstadoCivil.UNION_LIBRE,
|
|
78
|
+
danger: EnumEstadoCivil.NO_DEFINIDO, // Default color for unknown states
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
static getColors(campo) {
|
|
82
|
+
const colorArray = {};
|
|
83
|
+
|
|
84
|
+
for (const [color, description] of Object.entries(
|
|
85
|
+
EnumEstadoCalendario.colorMapping
|
|
86
|
+
)) {
|
|
87
|
+
const descriptionEntry = EnumEstadoCalendario.descriptions.find(
|
|
88
|
+
(item) => item.id === description
|
|
89
|
+
);
|
|
90
|
+
if (descriptionEntry) {
|
|
91
|
+
colorArray[color] = descriptionEntry[campo];
|
|
92
|
+
} else {
|
|
93
|
+
colorArray[color] = null; // Manejar el caso en que el campo no exista
|
|
94
|
+
}
|
|
59
95
|
}
|
|
96
|
+
return colorArray;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
static getColorName(campo, valor) {
|
|
100
|
+
const colors = EnumEstadoCalendario.getColors(campo);
|
|
101
|
+
return Object.keys(colors).find((color) => colors[color] === valor);
|
|
102
|
+
}
|
|
60
103
|
}
|
|
61
104
|
|
|
62
105
|
module.exports = EnumEstadoCivil;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
class EnumModulos {
|
|
2
|
+
static CONTRATACION = 1;
|
|
3
|
+
static LIQ_NOMINA = 2;
|
|
4
|
+
static LIQ_VACACIONES = 3;
|
|
5
|
+
static LIQ_PRESTSOCIALES = 4;
|
|
6
|
+
static LIQ_CONTRATO = 5;
|
|
7
|
+
static LIQ_PRESTAMO = 6;
|
|
8
|
+
// static SaldosIniciales = 14;
|
|
9
|
+
|
|
10
|
+
static descriptions = [
|
|
11
|
+
{
|
|
12
|
+
id: EnumModulos.CONTRATACION,
|
|
13
|
+
code: "CONTRATACION",
|
|
14
|
+
description: "Contratación",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: EnumModulos.LIQ_NOMINA,
|
|
18
|
+
code: "LIQ_NOMINA",
|
|
19
|
+
description: "Liquidación de Nómina",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: EnumModulos.LIQ_VACACIONES,
|
|
23
|
+
code: "LIQ_VACACIONES",
|
|
24
|
+
description: "Liquidación de Vacaciones",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: EnumModulos.LIQ_PRESTSOCIALES,
|
|
28
|
+
code: "LIQ_PRESTSOCIALES",
|
|
29
|
+
description: "Liquidación de Prestaciones Sociales",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: EnumModulos.LIQ_CONTRATO,
|
|
33
|
+
code: "LIQ_CONTRATO",
|
|
34
|
+
description: "Liquidación de Contrato",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: EnumModulos.LIQ_PRESTAMO,
|
|
38
|
+
code: "PRESTAMO",
|
|
39
|
+
description: "Préstamo",
|
|
40
|
+
}
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
static getById(id) {
|
|
44
|
+
return EnumModulos.descriptions.find((item) => item.id === id) || null;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
static getAll() {
|
|
48
|
+
return EnumModulos.descriptions;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static getByDescription(description) {
|
|
52
|
+
return (
|
|
53
|
+
EnumModulos.descriptions.find(
|
|
54
|
+
(item) => item.description === description
|
|
55
|
+
) || null
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
module.exports = EnumModulos;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
class EnumModulosNovedades {
|
|
2
|
-
static AporteVoluntarioSeguridadSocial = 1;
|
|
3
|
-
static Embargos = 2;
|
|
4
|
-
static HorasExtras = 3;
|
|
5
|
-
static FondosAhorroRegistros = 4;
|
|
6
|
-
static FondosAhorroPago = 5;
|
|
7
|
-
static IngresosDescuentosConsecutivos = 6;
|
|
8
|
-
static NovedadesCargos = 7;
|
|
9
|
-
static BeneficioPersonal = 8;
|
|
10
|
-
static NovedadesSeguridadSocial = 9;
|
|
11
|
-
static NovedadesReteFuente = 10;
|
|
12
|
-
static OtrosIngresosDescuentos = 11;
|
|
13
|
-
static Pagos_Externos = 12;
|
|
14
|
-
static Prestamos = 13;
|
|
15
|
-
// static SaldosIniciales = 14;
|
|
16
|
-
|
|
17
|
-
static descriptions = [
|
|
18
|
-
{ id: EnumModulosNovedades.AporteVoluntarioSeguridadSocial, code: 'AVSS', description: 'Aporte Voluntario Seguridad Social' },
|
|
19
|
-
{ id: EnumModulosNovedades.Embargos, code: 'EMB', description: 'Embargos' },
|
|
20
|
-
{ id: EnumModulosNovedades.HorasExtras, code: 'HE', description: 'Horas Extras' },
|
|
21
|
-
{ id: EnumModulosNovedades.FondosAhorroRegistros, code: 'FAR', description: 'Fondos Ahorro Registros' },
|
|
22
|
-
{ id: EnumModulosNovedades.FondosAhorroPago, code: 'FAP', description: 'Fondos Ahorro Pago' },
|
|
23
|
-
{ id: EnumModulosNovedades.IncapacidadValorizada, code: 'IV', description: 'Incapacidad Valorizada' },
|
|
24
|
-
{ id: EnumModulosNovedades.IngresosDescuentosConsecutivos, code: 'IDC', description: 'Ingresos Descuentos Consecutivos' },
|
|
25
|
-
{ id: EnumModulosNovedades.NovedadesCargos, code: 'NC', description: 'Novedades Cargos' },
|
|
26
|
-
{ id: EnumModulosNovedades.BeneficioPersonal, code: 'BP', description: 'Beneficio Personal' },
|
|
27
|
-
{ id: EnumModulosNovedades.NovedadesSeguridadSocial, code: 'NSS', description: 'Novedades Seguridad Social' },
|
|
28
|
-
{ id: EnumModulosNovedades.NovedadesReteFuente, code: 'NRF', description: 'Novedades Rete Fuente' },
|
|
29
|
-
{ id: EnumModulosNovedades.OtrosIngresosDescuentos, code: 'OID', description: 'Otros Ingresos Descuentos' },
|
|
30
|
-
{ id: EnumModulosNovedades.Pagos_Externos, code: 'PE', description: 'Pagos Externos' },
|
|
31
|
-
{ id: EnumModulosNovedades.Prestamos, code: 'PRE', description: 'Prestamos' },
|
|
32
|
-
// { id: EnumModulosNovedades.SaldosIniciales, code: 'SI', description: 'Saldos Iniciales' },
|
|
33
|
-
];
|
|
34
|
-
|
|
35
|
-
static getById(id) {
|
|
36
|
-
return EnumModulosNovedades.descriptions.find(item => item.id === id) || null;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
static getAll() {
|
|
40
|
-
return EnumModulosNovedades.descriptions;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
static getByDescription(description) {
|
|
44
|
-
return EnumModulosNovedades.descriptions.find(item => item.description === description) || null;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
module.exports = EnumModulosNovedades;
|