flit-models 3.3.20 → 3.3.22
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/lib/models/contas/auditoria/modificador/modificador-fire-convert.js +6 -7
- package/lib/models/contas/lancamento/index.d.ts +3 -0
- package/lib/models/contas/lancamento/index.js +2 -1
- package/lib/models/contas/lancamento/lancamento-elastic-convert.d.ts +2 -0
- package/lib/models/contas/lancamento/lancamento-elastic-convert.js +13 -0
- package/lib/models/contas/lancamento/lancamento-fire-convert.d.ts +3 -1
- package/lib/models/contas/lancamento/lancamento-fire-convert.js +20 -0
- package/lib/models/contas/lancamento/lancamento-json-convert.d.ts +2 -0
- package/lib/models/contas/lancamento/lancamento-json-convert.js +20 -0
- package/package.json +1 -1
|
@@ -27,14 +27,13 @@ var AuditoriaModificadorFireConvert = /** @class */ (function () {
|
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
29
|
AuditoriaModificadorFireConvert.toFirestore = function (auditoriaModificador) {
|
|
30
|
-
var _a, _b, _c;
|
|
31
30
|
var auditoriaModificadorFire = {
|
|
32
|
-
id:
|
|
33
|
-
ref:
|
|
34
|
-
tipo:
|
|
35
|
-
nome: string_helper_1.StringHelper.trim(auditoriaModificador.nome, null),
|
|
36
|
-
documento: string_helper_1.StringHelper.check(auditoriaModificador.documento, null),
|
|
37
|
-
email: string_helper_1.StringHelper.lower(auditoriaModificador.email, null),
|
|
31
|
+
id: auditoriaModificador.id || null,
|
|
32
|
+
ref: flitModelsDependencyInjection_1.FlitModelsDependencyInjection.DocumentReferenceFromPath(auditoriaModificador.ref) || null,
|
|
33
|
+
tipo: auditoriaModificador.tipo || null,
|
|
34
|
+
nome: string_helper_1.StringHelper.trim(auditoriaModificador.nome, null) || null,
|
|
35
|
+
documento: string_helper_1.StringHelper.check(auditoriaModificador.documento, null) || null,
|
|
36
|
+
email: string_helper_1.StringHelper.lower(auditoriaModificador.email, null) || null,
|
|
38
37
|
};
|
|
39
38
|
return (0, lodash_1.omitBy)(auditoriaModificadorFire, lodash_1.isUndefined);
|
|
40
39
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AuditoriaModificador } from '../auditoria/modificador';
|
|
1
2
|
import { TipoOcorrenciaFrequenciaEnum } from '../ocorrencia_frequencia';
|
|
2
3
|
export * from './lancamento-elastic-convert';
|
|
3
4
|
export * from './lancamento-fire-convert';
|
|
@@ -65,6 +66,7 @@ export interface LancamentoBase {
|
|
|
65
66
|
todos_colaboradores: any;
|
|
66
67
|
colaboradores_ids: any[];
|
|
67
68
|
periodos?: LancamentoPeriodoBase[];
|
|
69
|
+
modificador?: AuditoriaModificador;
|
|
68
70
|
}
|
|
69
71
|
export declare class LancamentoPeriodo implements LancamentoPeriodoBase {
|
|
70
72
|
inicial: {
|
|
@@ -117,6 +119,7 @@ export declare class Lancamento implements LancamentoBase {
|
|
|
117
119
|
parecer_gestor_concatenado_jornada: boolean;
|
|
118
120
|
};
|
|
119
121
|
};
|
|
122
|
+
modificador?: AuditoriaModificador;
|
|
120
123
|
/**
|
|
121
124
|
* Creates an instance of Lancamento.
|
|
122
125
|
* @param {Partial<Lancamento>} lancamentoPayload
|
|
@@ -70,7 +70,7 @@ var Lancamento = /** @class */ (function () {
|
|
|
70
70
|
* @memberof Lancamento
|
|
71
71
|
*/
|
|
72
72
|
function Lancamento(lancamentoPayload) {
|
|
73
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
73
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
74
74
|
this._id = (_a = lancamentoPayload._id) !== null && _a !== void 0 ? _a : undefined;
|
|
75
75
|
this._path = (_b = lancamentoPayload._path) !== null && _b !== void 0 ? _b : undefined;
|
|
76
76
|
this.data_criacao = (_c = lancamentoPayload.data_criacao) !== null && _c !== void 0 ? _c : undefined;
|
|
@@ -88,6 +88,7 @@ var Lancamento = /** @class */ (function () {
|
|
|
88
88
|
(_p = lancamentoPayload.todos_colaboradores) !== null && _p !== void 0 ? _p : undefined;
|
|
89
89
|
this.colaboradores_ids = (_q = lancamentoPayload.colaboradores_ids) !== null && _q !== void 0 ? _q : undefined;
|
|
90
90
|
this.integracao = (_r = lancamentoPayload.integracao) !== null && _r !== void 0 ? _r : undefined;
|
|
91
|
+
this.modificador = (_s = lancamentoPayload.modificador) !== null && _s !== void 0 ? _s : undefined;
|
|
91
92
|
}
|
|
92
93
|
return Lancamento;
|
|
93
94
|
}());
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Lancamento, LancamentoIntegracaoTipoEnum, LancamentoPeriodo, LancamentoStatusEnum } from '.';
|
|
2
|
+
import { AuditoriaModificador } from '../auditoria/modificador';
|
|
2
3
|
interface Empresa {
|
|
3
4
|
documento: string;
|
|
4
5
|
fantasia: string;
|
|
@@ -44,6 +45,7 @@ export interface LancamentoElasticSource {
|
|
|
44
45
|
periodos: LancamentoPeriodo[] | null;
|
|
45
46
|
status: LancamentoStatusEnum;
|
|
46
47
|
todos_colaboradores: boolean;
|
|
48
|
+
modificador?: AuditoriaModificador;
|
|
47
49
|
}
|
|
48
50
|
export declare abstract class LancamentoElasticConvert {
|
|
49
51
|
static fromElastic(doc: LancamentoElasticSource): Lancamento;
|
|
@@ -6,6 +6,7 @@ var boolean_helper_1 = require("../../utils/boolean-helper");
|
|
|
6
6
|
var string_helper_1 = require("../../utils/string-helper");
|
|
7
7
|
var _1 = require(".");
|
|
8
8
|
var date_helper_1 = require("../../utils/date-helper");
|
|
9
|
+
var lodash_1 = require("lodash");
|
|
9
10
|
var LancamentoElasticConvert = /** @class */ (function () {
|
|
10
11
|
function LancamentoElasticConvert() {
|
|
11
12
|
}
|
|
@@ -42,6 +43,18 @@ var LancamentoElasticConvert = /** @class */ (function () {
|
|
|
42
43
|
periodos: docData.periodos ? docData.periodos : null,
|
|
43
44
|
status: string_helper_1.StringHelper.trim(docData.status, null),
|
|
44
45
|
todos_colaboradores: boolean_helper_1.BooleanHelper.check(docData.todos_colaboradores, false),
|
|
46
|
+
modificador: docData.modificador
|
|
47
|
+
? (0, lodash_1.omitBy)({
|
|
48
|
+
id: (0, lodash_1.get)(docData.modificador, 'id', null),
|
|
49
|
+
ref: (0, lodash_1.get)(docData.modificador, 'ref', null)
|
|
50
|
+
? (0, lodash_1.get)(docData.modificador, 'ref', null)
|
|
51
|
+
: undefined,
|
|
52
|
+
tipo: (0, lodash_1.get)(docData.modificador, 'tipo', null),
|
|
53
|
+
nome: string_helper_1.StringHelper.trim((0, lodash_1.get)(docData.modificador, 'nome', null), null),
|
|
54
|
+
documento: string_helper_1.StringHelper.trim((0, lodash_1.get)(docData.modificador, 'documento', null), null),
|
|
55
|
+
email: string_helper_1.StringHelper.trim((0, lodash_1.get)(docData.modificador, 'email', null), null),
|
|
56
|
+
}, lodash_1.isUndefined)
|
|
57
|
+
: undefined,
|
|
45
58
|
});
|
|
46
59
|
};
|
|
47
60
|
return LancamentoElasticConvert;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Lancamento, LancamentoBase, LancamentoIntegracaoTipoEnum, LancamentoPeriodo, LancamentoStatusEnum, TipoAcaoLancamentoEnum } from '.';
|
|
2
2
|
import { FirebaseDocumentReferenceGeneric, FirebaseDocumentSnapshotGeneric, FirebaseQueryDocumentSnapshotGeneric, FirebaseTimestampGeneric } from '../../../shared/flitModelsDependencyInjection';
|
|
3
3
|
import { TipoOcorrenciaFrequenciaEnum } from '../ocorrencia_frequencia';
|
|
4
|
-
|
|
4
|
+
import { AuditoriaModificadorFirestoreData } from '../auditoria/modificador';
|
|
5
|
+
export declare class LancamentoFirestoreData implements Omit<LancamentoBase, 'modificador'> {
|
|
5
6
|
data_criacao: FirebaseTimestampGeneric;
|
|
6
7
|
data_atualizacao: FirebaseTimestampGeneric;
|
|
7
8
|
data_inicial: FirebaseTimestampGeneric;
|
|
@@ -33,6 +34,7 @@ export declare class LancamentoFirestoreData implements LancamentoBase {
|
|
|
33
34
|
status: LancamentoStatusEnum;
|
|
34
35
|
todos_colaboradores: boolean;
|
|
35
36
|
colaboradores_ids: string[];
|
|
37
|
+
modificador?: AuditoriaModificadorFirestoreData;
|
|
36
38
|
}
|
|
37
39
|
export declare abstract class LancamentoFireConvert {
|
|
38
40
|
static fromFirestore(doc: FirebaseDocumentSnapshotGeneric | FirebaseQueryDocumentSnapshotGeneric): Lancamento;
|
|
@@ -53,6 +53,16 @@ var LancamentoFireConvert = /** @class */ (function () {
|
|
|
53
53
|
detalhes: docData.integracao.detalhes,
|
|
54
54
|
}, lodash_1.isUndefined)
|
|
55
55
|
: undefined,
|
|
56
|
+
modificador: docData.modificador
|
|
57
|
+
? (0, lodash_1.omitBy)({
|
|
58
|
+
id: (0, lodash_1.get)(docData.modificador, 'id', null),
|
|
59
|
+
ref: (0, lodash_1.get)(docData.modificador, 'ref.path', null),
|
|
60
|
+
tipo: (0, lodash_1.get)(docData.modificador, 'tipo', null),
|
|
61
|
+
nome: string_helper_1.StringHelper.trim((0, lodash_1.get)(docData.modificador, 'nome', null), null),
|
|
62
|
+
documento: string_helper_1.StringHelper.trim((0, lodash_1.get)(docData.modificador, 'documento', null), null),
|
|
63
|
+
email: string_helper_1.StringHelper.trim((0, lodash_1.get)(docData.modificador, 'email', null), null),
|
|
64
|
+
}, lodash_1.isUndefined)
|
|
65
|
+
: undefined,
|
|
56
66
|
});
|
|
57
67
|
};
|
|
58
68
|
LancamentoFireConvert.toFirestore = function (lancamento) {
|
|
@@ -91,6 +101,16 @@ var LancamentoFireConvert = /** @class */ (function () {
|
|
|
91
101
|
detalhes: lancamento.integracao.detalhes,
|
|
92
102
|
}, lodash_1.isUndefined)
|
|
93
103
|
: undefined,
|
|
104
|
+
modificador: lancamento.modificador
|
|
105
|
+
? (0, lodash_1.omitBy)({
|
|
106
|
+
id: (0, lodash_1.get)(lancamento.modificador, 'id', null),
|
|
107
|
+
ref: (0, lodash_1.get)(lancamento.modificador, 'ref', null),
|
|
108
|
+
tipo: (0, lodash_1.get)(lancamento.modificador, 'tipo', null),
|
|
109
|
+
nome: string_helper_1.StringHelper.trim((0, lodash_1.get)(lancamento.modificador, 'nome', null), null),
|
|
110
|
+
documento: string_helper_1.StringHelper.trim((0, lodash_1.get)(lancamento.modificador, 'documento', null), null),
|
|
111
|
+
email: string_helper_1.StringHelper.trim((0, lodash_1.get)(lancamento.modificador, 'email', null), null),
|
|
112
|
+
}, lodash_1.isUndefined)
|
|
113
|
+
: undefined,
|
|
94
114
|
};
|
|
95
115
|
return (0, lodash_1.omitBy)(lancamentoFire, lodash_1.isUndefined);
|
|
96
116
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Lancamento, LancamentoBase, LancamentoIntegracaoTipoEnum, LancamentoPeriodo, LancamentoStatusEnum, TipoAcaoLancamentoEnum } from '.';
|
|
2
2
|
import { TipoOcorrenciaFrequenciaEnum } from '../ocorrencia_frequencia';
|
|
3
|
+
import { AuditoriaModificador } from '../auditoria/modificador';
|
|
3
4
|
export declare class LancamentoJsonData implements LancamentoBase {
|
|
4
5
|
colaboradores_ids: string[];
|
|
5
6
|
data_criacao: string;
|
|
@@ -34,6 +35,7 @@ export declare class LancamentoJsonData implements LancamentoBase {
|
|
|
34
35
|
parecer_gestor_concatenado_jornada: boolean;
|
|
35
36
|
};
|
|
36
37
|
};
|
|
38
|
+
modificador?: AuditoriaModificador;
|
|
37
39
|
}
|
|
38
40
|
export declare abstract class LancamentoJsonConvert {
|
|
39
41
|
static fromJson(obj: LancamentoJsonData): Lancamento;
|
|
@@ -54,6 +54,16 @@ var LancamentoJsonConvert = /** @class */ (function () {
|
|
|
54
54
|
detalhes: obj.integracao.detalhes,
|
|
55
55
|
}, lodash_1.isUndefined)
|
|
56
56
|
: undefined,
|
|
57
|
+
modificador: obj.modificador
|
|
58
|
+
? (0, lodash_1.omitBy)({
|
|
59
|
+
id: (0, lodash_1.get)(obj.modificador, 'id', null),
|
|
60
|
+
ref: (0, lodash_1.get)(obj.modificador, 'ref', null),
|
|
61
|
+
tipo: (0, lodash_1.get)(obj.modificador, 'tipo', null),
|
|
62
|
+
nome: string_helper_1.StringHelper.trim((0, lodash_1.get)(obj.modificador, 'nome', null), null),
|
|
63
|
+
documento: string_helper_1.StringHelper.trim((0, lodash_1.get)(obj.modificador, 'documento', null), null),
|
|
64
|
+
email: string_helper_1.StringHelper.trim((0, lodash_1.get)(obj.modificador, 'email', null), null),
|
|
65
|
+
}, lodash_1.isUndefined)
|
|
66
|
+
: undefined,
|
|
57
67
|
});
|
|
58
68
|
};
|
|
59
69
|
LancamentoJsonConvert.toJson = function (lancamento) {
|
|
@@ -94,6 +104,16 @@ var LancamentoJsonConvert = /** @class */ (function () {
|
|
|
94
104
|
detalhes: lancamento.integracao.detalhes,
|
|
95
105
|
}, lodash_1.isUndefined)
|
|
96
106
|
: undefined,
|
|
107
|
+
modificador: lancamento.modificador
|
|
108
|
+
? (0, lodash_1.omitBy)({
|
|
109
|
+
id: (0, lodash_1.get)(lancamento.modificador, 'id', null),
|
|
110
|
+
ref: (0, lodash_1.get)(lancamento.modificador, 'ref', null),
|
|
111
|
+
tipo: (0, lodash_1.get)(lancamento.modificador, 'tipo', null),
|
|
112
|
+
nome: string_helper_1.StringHelper.trim((0, lodash_1.get)(lancamento.modificador, 'nome', null), null),
|
|
113
|
+
documento: string_helper_1.StringHelper.trim((0, lodash_1.get)(lancamento.modificador, 'documento', null), null),
|
|
114
|
+
email: string_helper_1.StringHelper.trim((0, lodash_1.get)(lancamento.modificador, 'email', null), null),
|
|
115
|
+
}, lodash_1.isUndefined)
|
|
116
|
+
: undefined,
|
|
97
117
|
};
|
|
98
118
|
return (0, lodash_1.omitBy)(lancamentoJson, lodash_1.isUndefined);
|
|
99
119
|
};
|