flit-modulo-exportacoes 2.0.71 → 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.
- package/dist/index.d.ts +6 -1
- package/dist/index.js +81 -84
- package/package.json +1 -1
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
|
|
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 (
|
|
533
|
-
|
|
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
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
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
|
}
|