flit-modulo-exportacoes 2.0.70 → 2.0.72

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.
@@ -217,7 +217,7 @@ export interface FaltaEnvioEContador {
217
217
  */
218
218
  export interface MovimentoEnvioEContador {
219
219
  fim: string;
220
- valor: number;
220
+ valor: string;
221
221
  inicio: string;
222
222
  created: string;
223
223
  eventoId: string;
package/dist/index.d.ts CHANGED
@@ -23,4 +23,9 @@ export declare function calcularValoresExportacao({ contaId, dataFinal, dataInic
23
23
  };
24
24
  }): Promise<ValoresEventosExportacao>;
25
25
  export declare function retornaValorEvento(tipoEvento: TipoEventoExportacao, valoresEventos: ValoresEventosExportacao): ValorEventoExportacao | ValorEventoExportacaoFalta;
26
- export declare function processarTiposEventosExportacao(tiposEventos: Array<TiposEventosExportar>): Array<TipoEventoExportacao>;
26
+ export declare function processarTiposEventosExportacao({ tiposEventos, eventosModelo }: {
27
+ tiposEventos: Array<TiposEventosExportar>;
28
+ eventosModelo: {
29
+ [key in TipoEventoExportacao]: string;
30
+ };
31
+ }): Array<TipoEventoExportacao>;
package/dist/index.js CHANGED
@@ -527,92 +527,89 @@ function retornaValorEvento(tipoEvento, valoresEventos) {
527
527
  }
528
528
  }
529
529
  exports.retornaValorEvento = retornaValorEvento;
530
- function processarTiposEventosExportacao(tiposEventos) {
530
+ function processarTiposEventosExportacao({ tiposEventos, eventosModelo }) {
531
+ const tiposEventosInterno = new Array();
532
+ for (const tipoEvento of ((tiposEventos.length > 0) ? tiposEventos : Object.values(Object.freeze(general_models_1.TiposEventosExportar)))) {
533
+ tiposEventosInterno.push(tipoEvento);
534
+ }
531
535
  const retorno = new Array();
532
- if (tiposEventos.length <= 0) {
533
- for (const tipoEvento of Object.values(Object.freeze(general_models_1.TipoEventoExportacao))) {
534
- retorno.push(tipoEvento);
535
- }
536
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.FALTA) && eventosModelo?.falta) {
537
+ retorno.push(general_models_1.TipoEventoExportacao.FALTA);
536
538
  }
537
- else {
538
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.FALTA)) {
539
- retorno.push(general_models_1.TipoEventoExportacao.FALTA);
540
- }
541
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.ATRASO)) {
542
- retorno.push(general_models_1.TipoEventoExportacao.ATRASO);
543
- }
544
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.HORA_NORMAL)) {
545
- retorno.push(general_models_1.TipoEventoExportacao.HORA_NORMAL);
546
- }
547
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.HORA_NOTURNA)) {
548
- retorno.push(general_models_1.TipoEventoExportacao.HORA_NOTURNA);
549
- }
550
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_SAB)) {
551
- retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_SAB);
552
- }
553
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_DOM)) {
554
- retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_DOM);
555
- }
556
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_FER)) {
557
- retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_FER);
558
- }
559
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_FOLGA)) {
560
- retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_FOLGA);
561
- }
562
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.HORAS_TRABALHADAS)) {
563
- retorno.push(general_models_1.TipoEventoExportacao.HORAS_TRABALHADAS);
564
- }
565
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_SEG_SEX)) {
566
- retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_SEG_SEX);
567
- }
568
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.HORAS_NOTURNAS_TOTAIS)) {
569
- retorno.push(general_models_1.TipoEventoExportacao.HORAS_NOTURNAS_TOTAIS);
570
- }
571
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_NOTURNA_SAB)) {
572
- retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_NOTURNA_SAB);
573
- }
574
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_NOTURNA_DOM)) {
575
- retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_NOTURNA_DOM);
576
- }
577
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_NOTURNA_FER)) {
578
- retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_NOTURNA_FER);
579
- }
580
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_NOTURNA_FOLGA)) {
581
- retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_NOTURNA_FOLGA);
582
- }
583
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_INTRAJORNADA)) {
584
- retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_INTRAJORNADA);
585
- }
586
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_NOTURNA_SEG_SEX)) {
587
- retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_NOTURNA_SEG_SEX);
588
- }
589
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.FAIXA_HORA_EXTRA_SEMANAL_1)) {
590
- retorno.push(general_models_1.TipoEventoExportacao.FAIXA_HORA_EXTRA_SEMANAL_1);
591
- }
592
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.FAIXA_HORA_EXTRA_SEMANAL_2)) {
593
- retorno.push(general_models_1.TipoEventoExportacao.FAIXA_HORA_EXTRA_SEMANAL_2);
594
- }
595
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.FAIXA_HORA_EXTRA_SEMANAL_3)) {
596
- retorno.push(general_models_1.TipoEventoExportacao.FAIXA_HORA_EXTRA_SEMANAL_3);
597
- }
598
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.FAIXA_HORA_EXTRA_DIFERENCIADA_1)) {
599
- retorno.push(general_models_1.TipoEventoExportacao.FAIXA_HORA_EXTRA_DIFERENCIADA_1);
600
- }
601
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.FAIXA_HORA_EXTRA_DIFERENCIADA_2)) {
602
- retorno.push(general_models_1.TipoEventoExportacao.FAIXA_HORA_EXTRA_DIFERENCIADA_2);
603
- }
604
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.FAIXA_HORA_EXTRA_DIFERENCIADA_3)) {
605
- retorno.push(general_models_1.TipoEventoExportacao.FAIXA_HORA_EXTRA_DIFERENCIADA_3);
606
- }
607
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.QUANTIDADE_DIAS_TRABALHADOS_FOLGA)) {
608
- retorno.push(general_models_1.TipoEventoExportacao.QUANTIDADE_DIAS_TRABALHADOS_FOLGA);
609
- }
610
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.QUANTIDADE_DIAS_TRABALHADOS_FERIADO)) {
611
- retorno.push(general_models_1.TipoEventoExportacao.QUANTIDADE_DIAS_TRABALHADOS_FERIADO);
612
- }
613
- if (tiposEventos.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_INTRAJORNADA_COM_REDUCAO)) {
614
- retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_INTRAJORNADA_COM_REDUCAO);
615
- }
539
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.ATRASO) && eventosModelo?.atraso) {
540
+ retorno.push(general_models_1.TipoEventoExportacao.ATRASO);
541
+ }
542
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.HORA_NORMAL) && eventosModelo?.hora_normal) {
543
+ retorno.push(general_models_1.TipoEventoExportacao.HORA_NORMAL);
544
+ }
545
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.HORA_NOTURNA) && eventosModelo?.hora_noturna) {
546
+ retorno.push(general_models_1.TipoEventoExportacao.HORA_NOTURNA);
547
+ }
548
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_SEG_SEX) && eventosModelo?.hora_extra) {
549
+ retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_SEG_SEX);
550
+ }
551
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_SAB) && eventosModelo?.hora_extra_sabado) {
552
+ retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_SAB);
553
+ }
554
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_DOM) && eventosModelo?.hora_extra_domingo) {
555
+ retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_DOM);
556
+ }
557
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_FER) && eventosModelo?.hora_extra_feriado) {
558
+ retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_FER);
559
+ }
560
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_FOLGA) && eventosModelo?.hora_extra_folga) {
561
+ retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_FOLGA);
562
+ }
563
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.HORAS_TRABALHADAS) && eventosModelo?.horas_trabalhadas) {
564
+ retorno.push(general_models_1.TipoEventoExportacao.HORAS_TRABALHADAS);
565
+ }
566
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.HORAS_NOTURNAS_TOTAIS) && eventosModelo?.horas_noturnas_totais) {
567
+ retorno.push(general_models_1.TipoEventoExportacao.HORAS_NOTURNAS_TOTAIS);
568
+ }
569
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_NOTURNA_SEG_SEX) && eventosModelo?.hora_extra_noturna) {
570
+ retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_NOTURNA_SEG_SEX);
571
+ }
572
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_INTRAJORNADA) && eventosModelo?.hora_extra_intrajornada) {
573
+ retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_INTRAJORNADA);
574
+ }
575
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_NOTURNA_SAB) && eventosModelo?.hora_extra_noturna_sabado) {
576
+ retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_NOTURNA_SAB);
577
+ }
578
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_NOTURNA_DOM) && eventosModelo?.hora_extra_noturna_domingo) {
579
+ retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_NOTURNA_DOM);
580
+ }
581
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_NOTURNA_FER) && eventosModelo?.hora_extra_noturna_feriado) {
582
+ retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_NOTURNA_FER);
583
+ }
584
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_NOTURNA_FOLGA) && eventosModelo?.hora_extra_noturna_folga) {
585
+ retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_NOTURNA_FOLGA);
586
+ }
587
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.FAIXA_HORA_EXTRA_SEMANAL_1) && eventosModelo?.faixa_hora_extra_semanal_1) {
588
+ retorno.push(general_models_1.TipoEventoExportacao.FAIXA_HORA_EXTRA_SEMANAL_1);
589
+ }
590
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.FAIXA_HORA_EXTRA_SEMANAL_2) && eventosModelo?.faixa_hora_extra_semanal_2) {
591
+ retorno.push(general_models_1.TipoEventoExportacao.FAIXA_HORA_EXTRA_SEMANAL_2);
592
+ }
593
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.FAIXA_HORA_EXTRA_SEMANAL_3) && eventosModelo?.faixa_hora_extra_semanal_3) {
594
+ retorno.push(general_models_1.TipoEventoExportacao.FAIXA_HORA_EXTRA_SEMANAL_3);
595
+ }
596
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.FAIXA_HORA_EXTRA_DIFERENCIADA_1) && eventosModelo?.faixa_hora_extra_diferenciada_1) {
597
+ retorno.push(general_models_1.TipoEventoExportacao.FAIXA_HORA_EXTRA_DIFERENCIADA_1);
598
+ }
599
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.FAIXA_HORA_EXTRA_DIFERENCIADA_2) && eventosModelo?.faixa_hora_extra_diferenciada_2) {
600
+ retorno.push(general_models_1.TipoEventoExportacao.FAIXA_HORA_EXTRA_DIFERENCIADA_2);
601
+ }
602
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.FAIXA_HORA_EXTRA_DIFERENCIADA_3) && eventosModelo?.faixa_hora_extra_diferenciada_3) {
603
+ retorno.push(general_models_1.TipoEventoExportacao.FAIXA_HORA_EXTRA_DIFERENCIADA_3);
604
+ }
605
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.QUANTIDADE_DIAS_TRABALHADOS_FOLGA) && eventosModelo?.quantidade_dias_trabalhados_folga) {
606
+ retorno.push(general_models_1.TipoEventoExportacao.QUANTIDADE_DIAS_TRABALHADOS_FOLGA);
607
+ }
608
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.QUANTIDADE_DIAS_TRABALHADOS_FERIADO) && eventosModelo?.quantidade_dias_trabalhados_feriado) {
609
+ retorno.push(general_models_1.TipoEventoExportacao.QUANTIDADE_DIAS_TRABALHADOS_FERIADO);
610
+ }
611
+ if (tiposEventosInterno.includes(general_models_1.TiposEventosExportar.HORA_EXTRA_INTRAJORNADA_COM_REDUCAO) && eventosModelo?.hora_extra_intrajornada_com_reducao) {
612
+ retorno.push(general_models_1.TipoEventoExportacao.HORA_EXTRA_INTRAJORNADA_COM_REDUCAO);
616
613
  }
617
614
  return retorno;
618
615
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flit-modulo-exportacoes",
3
- "version": "2.0.70",
3
+ "version": "2.0.72",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "directories": {