softdinlibreriajs 12.0.38 → 12.0.39
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/EnumTipoCentroCosto.js +33 -18
package/package.json
CHANGED
|
@@ -1,26 +1,41 @@
|
|
|
1
1
|
class EnumTipoCentroCosto {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
static UNICO = 1;
|
|
3
|
+
static TIEMPO = 2;
|
|
4
|
+
static PORCENTAJE = 3;
|
|
5
|
+
static PORCENTAJE_TIEMPO = 4;
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
static descriptions = [
|
|
8
|
+
{ id: EnumTipoCentroCosto.UNICO, code: "UNICO", description: "Unico" },
|
|
9
|
+
{ id: EnumTipoCentroCosto.TIEMPO, code: "TIEMPO", description: "Tiempo" },
|
|
10
|
+
{
|
|
11
|
+
id: EnumTipoCentroCosto.PORCENTAJE,
|
|
12
|
+
code: "PORCENTAJE",
|
|
13
|
+
description: "Porcentaje",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: EnumTipoCentroCosto.PORCENTAJE_TIEMPO,
|
|
17
|
+
code: "PORCENTAJE TIEMPO",
|
|
18
|
+
description: "Porcentaje y Tiempo",
|
|
19
|
+
},
|
|
20
|
+
];
|
|
11
21
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
22
|
+
static getById(id) {
|
|
23
|
+
return (
|
|
24
|
+
EnumTipoCentroCosto.descriptions.find((item) => item.id === id) || null
|
|
25
|
+
);
|
|
26
|
+
}
|
|
15
27
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
28
|
+
static getAll() {
|
|
29
|
+
return EnumTipoCentroCosto.descriptions;
|
|
30
|
+
}
|
|
19
31
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
32
|
+
static getByDescription(description) {
|
|
33
|
+
return (
|
|
34
|
+
EnumTipoCentroCosto.descriptions.find(
|
|
35
|
+
(item) => item.description === description
|
|
36
|
+
) || null
|
|
37
|
+
);
|
|
38
|
+
}
|
|
23
39
|
}
|
|
24
40
|
|
|
25
41
|
module.exports = EnumTipoCentroCosto;
|
|
26
|
-
|