flit-modulo-exportacoes 1.0.6 → 1.0.8

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.
@@ -10,7 +10,7 @@ export declare enum EnumFormaEnvioFaltasEventosExportacoes {
10
10
  Horas = "HORAS",
11
11
  Dias = "DIAS"
12
12
  }
13
- export declare type PropsCodigosEventosExportacoes<T = any> = {
13
+ export type PropsCodigosEventosExportacoes<T = any> = {
14
14
  [Property in keyof CodigosEventosExportacoes]: T;
15
15
  };
16
16
  export interface EventosExportacoes {
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export declare function retornaValorEvento(tipoEvento: TipoEventoExportacao, val
4
4
  export declare function processarTiposEventosExportar(tiposEventos: Array<TiposEventosExportar>): {
5
5
  enviarFaltas: boolean;
6
6
  enviarAtrasos: boolean;
7
+ enviarMinutosNormais: boolean;
7
8
  enviarMinutosNoturnos: boolean;
8
9
  enviarMinutosExtrasSab: boolean;
9
10
  enviarMinutosExtrasDom: boolean;
package/dist/index.js CHANGED
@@ -39,6 +39,8 @@ function retornaValorEvento(tipoEvento, valoresEventos) {
39
39
  return valoresEventos.MinutosExtrasSegSex;
40
40
  case models_1.TipoEventoExportacao.HORA_NOTURNA:
41
41
  return valoresEventos.MinutosNoturnos;
42
+ case models_1.TipoEventoExportacao.HORA_NORMAL:
43
+ return valoresEventos.MinutosNormais;
42
44
  case models_1.TipoEventoExportacao.ATRASO:
43
45
  return Math.abs(valoresEventos.MinutosAtraso);
44
46
  case models_1.TipoEventoExportacao.FALTA:
@@ -54,6 +56,8 @@ function processarTiposEventosExportar(tiposEventos) {
54
56
  tiposEventos.includes(models_1.TiposEventosExportar.FALTA),
55
57
  enviarAtrasos: tiposEventos.length <= 0 ||
56
58
  tiposEventos.includes(models_1.TiposEventosExportar.ATRASO),
59
+ enviarMinutosNormais: tiposEventos.length <= 0 ||
60
+ tiposEventos.includes(models_1.TiposEventosExportar.HORA_NORMAL),
57
61
  enviarMinutosNoturnos: tiposEventos.length <= 0 ||
58
62
  tiposEventos.includes(models_1.TiposEventosExportar.HORA_NOTURNA),
59
63
  enviarMinutosExtrasSab: tiposEventos.length <= 0 ||
package/dist/models.d.ts CHANGED
@@ -6,6 +6,7 @@
6
6
  export declare enum TipoEventoExportacao {
7
7
  FALTA = "falta",
8
8
  ATRASO = "atraso",
9
+ HORA_NORMAL = "hora_normal",
9
10
  HORA_NOTURNA = "hora_noturna",
10
11
  HORA_EXTRA_SEG_SEX = "hora_extra",
11
12
  HORA_EXTRA_SAB = "hora_extra_sabado",
@@ -26,6 +27,7 @@ export declare enum TipoEventoExportacao {
26
27
  export declare enum TiposEventosExportar {
27
28
  FALTA = "FALTA",
28
29
  ATRASO = "ATRASO",
30
+ HORA_NORMAL = "HORA_NORMAL",
29
31
  HORA_NOTURNA = "HORA_NOTURNA",
30
32
  HORA_EXTRA_SAB = "HORA_EXTRA_SAB",
31
33
  HORA_EXTRA_DOM = "HORA_EXTRA_DOM",
@@ -52,6 +54,7 @@ export interface PayloadExportacaoPadrao {
52
54
  data_inicial: string;
53
55
  tabela_eventos_id: string;
54
56
  tipos_eventos: Array<TiposEventosExportar>;
57
+ referencia?: string;
55
58
  }
56
59
  /**
57
60
  * Interface do modelo do payload das funções de exportação.
@@ -73,6 +76,7 @@ export interface DadosEmpresaExportacao {
73
76
  export interface ValoresEventosExportacao {
74
77
  ValorFaltas: number;
75
78
  MinutosAtraso: number;
79
+ MinutosNormais: number;
76
80
  MinutosNoturnos: number;
77
81
  MinutosExtrasSegSex: number;
78
82
  MinutosExtrasSabado: number;
package/dist/models.js CHANGED
@@ -10,6 +10,7 @@ var TipoEventoExportacao;
10
10
  (function (TipoEventoExportacao) {
11
11
  TipoEventoExportacao["FALTA"] = "falta";
12
12
  TipoEventoExportacao["ATRASO"] = "atraso";
13
+ TipoEventoExportacao["HORA_NORMAL"] = "hora_normal";
13
14
  TipoEventoExportacao["HORA_NOTURNA"] = "hora_noturna";
14
15
  TipoEventoExportacao["HORA_EXTRA_SEG_SEX"] = "hora_extra";
15
16
  TipoEventoExportacao["HORA_EXTRA_SAB"] = "hora_extra_sabado";
@@ -31,6 +32,7 @@ var TiposEventosExportar;
31
32
  (function (TiposEventosExportar) {
32
33
  TiposEventosExportar["FALTA"] = "FALTA";
33
34
  TiposEventosExportar["ATRASO"] = "ATRASO";
35
+ TiposEventosExportar["HORA_NORMAL"] = "HORA_NORMAL";
34
36
  TiposEventosExportar["HORA_NOTURNA"] = "HORA_NOTURNA";
35
37
  TiposEventosExportar["HORA_EXTRA_SAB"] = "HORA_EXTRA_SAB";
36
38
  TiposEventosExportar["HORA_EXTRA_DOM"] = "HORA_EXTRA_DOM";
@@ -28,6 +28,12 @@ class UnificacaoEventosRepetidos {
28
28
  valoresEventos.MinutosAtraso = 0;
29
29
  }
30
30
  break;
31
+ case models_1.TipoEventoExportacao.HORA_NORMAL:
32
+ somatorio += valoresEventos.MinutosNormais ?? 0;
33
+ if (index > 0) {
34
+ valoresEventos.MinutosNormais = 0;
35
+ }
36
+ break;
31
37
  case models_1.TipoEventoExportacao.HORA_NOTURNA:
32
38
  somatorio += valoresEventos.MinutosNoturnos ?? 0;
33
39
  if (index > 0) {
@@ -96,6 +102,9 @@ class UnificacaoEventosRepetidos {
96
102
  case models_1.TipoEventoExportacao.ATRASO:
97
103
  valoresEventos.MinutosAtraso = somatorio;
98
104
  break;
105
+ case models_1.TipoEventoExportacao.HORA_NORMAL:
106
+ valoresEventos.MinutosNormais = somatorio;
107
+ break;
99
108
  case models_1.TipoEventoExportacao.HORA_NOTURNA:
100
109
  valoresEventos.MinutosNoturnos = somatorio;
101
110
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flit-modulo-exportacoes",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "",
5
5
  "main": "dist/lib/index.js",
6
6
  "directories": {
@@ -12,11 +12,11 @@
12
12
  "types": "dist/lib/index.d.ts",
13
13
  "prepublish": "npm run build",
14
14
  "dependencies": {
15
- "tsc-alias": "^1.7.0"
15
+ "tsc-alias": "^1.8.2"
16
16
  },
17
17
  "devDependencies": {
18
- "prettier": "^2.7.1",
19
- "typescript": "^4.8.4"
18
+ "prettier": "^2.8.1",
19
+ "typescript": "^4.9.4"
20
20
  },
21
21
  "scripts": {
22
22
  "build": "tsc --project tsconfig.json && tsc-alias -p tsconfig.json",