softdinlibreriajs 1.0.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.
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "softdinlibreriajs",
3
+ "version": "1.0.0",
4
+ "description": "Libreria Softdin",
5
+ "main": "src/",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/SoftdinNomina/libreriaSoftdinJS.git"
12
+ },
13
+ "keywords": [
14
+ "keyword"
15
+ ],
16
+ "author": "Deivi Ibarra Negrette",
17
+ "license": "MIT",
18
+ "bugs": {
19
+ "url": "https://github.com/SoftdinNomina/libreriaSoftdinJS/issues"
20
+ },
21
+ "homepage": "https://github.com/SoftdinNomina/libreriaSoftdinJS#readme"
22
+ }
@@ -0,0 +1,38 @@
1
+ class EnumActualizacionWEB {
2
+ static REGISTRADO = 1;
3
+ static NO_REGISTRADO = 3;
4
+ static ESPERANDO_GUARDAR = 2;
5
+ static ACTUALIZADO = 4;
6
+ static DESACTUALIZADO = 5;
7
+ static NO_SUBIDO_WEB = 6;
8
+ static ACTIVO = 7;
9
+ static INACTIVO = 8;
10
+
11
+ static descriptions = [
12
+ { id: EnumActualizacionWEB.REGISTRADO, code: 'REGISTRADO', description: "Registrado" },
13
+ { id: EnumActualizacionWEB.NO_REGISTRADO, code: 'NO_REGISTRADO', description: "No Registrado" },
14
+ { id: EnumActualizacionWEB.ESPERANDO_GUARDAR, code: 'ESPERANDO_GUARDAR', description: "Esperando Guardar"},
15
+ { id: EnumActualizacionWEB.ACTUALIZADO, code: 'ACTUALIZADO', description: "Actualizado"},
16
+ { id: EnumActualizacionWEB.DESACTUALIZADO, code: 'DESACTUALIZADO', description: "Desactualizado"},
17
+ { id: EnumActualizacionWEB.NO_SUBIDO_WEB, code: 'NO_SUBIDO_WEB', description: "No Subido a la Web"},
18
+ { id: EnumActualizacionWEB.ACTIVO, code: 'ACTIVO', description: "Activo"},
19
+ { id: EnumActualizacionWEB.INACTIVO, code: 'INACTIVO', description: "Inactivo" }
20
+ ];
21
+
22
+ static getById(id) {
23
+ return EnumActualizacionWEB.descriptions.find(item => item.id === id) || null;
24
+ }
25
+
26
+ static getAll() {
27
+ return EnumActualizacionWEB.descriptions;
28
+ }
29
+
30
+ static getByDescription(description) {
31
+ return EnumActualizacionWEB.descriptions.find(item => item.description === description) || null;
32
+ }
33
+ }
34
+
35
+ module.exports = EnumActualizacionWEB;
36
+
37
+ // Ejemplo de uso
38
+ // console.log(EnumActualizacionWEB.getById(1)); // Imprime el objeto de la enumeración con ID 1
@@ -0,0 +1,27 @@
1
+ class EnumAreaTrabajo {
2
+ static ADMINISTRATIVO = 1;
3
+ static OPERATIVO = 2;
4
+
5
+ static descriptions = [
6
+ { id: EnumAreaTrabajo.ADMINISTRATIVO, code: 'ADMINISTRATIVO', description: 'Administrativo' },
7
+ { id: EnumAreaTrabajo.OPERATIVO, code: 'OPERATIVO', description: 'Operativo' },
8
+ ];
9
+
10
+ static getCollection() {
11
+ return EnumAreaTrabajo.descriptions;
12
+ }
13
+
14
+ static getById(id) {
15
+ return EnumAreaTrabajo.descriptions.find(item => item.id === id) || null;
16
+ }
17
+
18
+ static getAll() {
19
+ return EnumAreaTrabajo.descriptions;
20
+ }
21
+
22
+ static getByDescription(description) {
23
+ return EnumAreaTrabajo.descriptions.find(item => item.description === description) || null;
24
+ }
25
+ }
26
+
27
+ module.exports = EnumAreaTrabajo;
@@ -0,0 +1,31 @@
1
+ class EnumClaseEmpresa {
2
+ static EMPRESA = 1;
3
+ static COOPERATIVA = 2;
4
+ static BANCO = 3;
5
+ static PILA = 4;
6
+
7
+ static descriptions = [
8
+ { id: EnumClaseEmpresa.EMPRESA, code: 'EMP', description: 'EMPRESA' },
9
+ { id: EnumClaseEmpresa.COOPERATIVA, code: 'COP', description: 'COOPERATIVA' },
10
+ { id: EnumClaseEmpresa.BANCO, code: 'BAN', description: 'BANCO' },
11
+ { id: EnumClaseEmpresa.PILA, code: 'PIL', description: 'PILA' },
12
+ ];
13
+
14
+ static getCollection() {
15
+ return EnumClaseEmpresa.descriptions;
16
+ }
17
+
18
+ static getById(id) {
19
+ return EnumClaseEmpresa.descriptions.find(item => item.id === id) || null;
20
+ }
21
+
22
+ static getAll() {
23
+ return EnumClaseEmpresa.descriptions;
24
+ }
25
+
26
+ static getByDescription(description) {
27
+ return EnumClaseEmpresa.descriptions.find(item => item.description === description) || null;
28
+ }
29
+ }
30
+
31
+ module.exports = EnumClaseEmpresa;