flit-models 3.2.32 → 3.2.34
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/feriado/feriado-fire-convert.d.ts +2 -1
- package/lib/models/contas/feriado/feriado-fire-convert.js +8 -3
- package/lib/models/contas/feriado/feriado-json-convert.d.ts +1 -0
- package/lib/models/contas/feriado/feriado-json-convert.js +2 -0
- package/lib/models/contas/feriado/index.d.ts +2 -0
- package/lib/models/contas/feriado/index.js +5 -4
- package/lib/models/contas/lancamento/index.d.ts +1 -1
- package/lib/models/contas/lancamento/lancamento-elastic-convert.d.ts +1 -1
- package/lib/models/contas/lancamento/lancamento-elastic-convert.js +3 -1
- package/lib/models/contas/lancamento/lancamento-fire-convert.d.ts +1 -1
- package/lib/models/contas/lancamento/lancamento-fire-convert.js +3 -1
- package/lib/models/contas/lancamento/lancamento-json-convert.d.ts +1 -1
- package/lib/models/contas/lancamento/lancamento-json-convert.js +6 -2
- package/package.json +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Feriado, FeriadoBase, FeriadoTipoEnum } from '.';
|
|
2
|
-
import { FirebaseDocumentSnapshotGeneric, FirebaseQueryDocumentSnapshotGeneric, FirebaseTimestampGeneric } from '../../../shared/flitModelsDependencyInjection';
|
|
2
|
+
import { FirebaseDocumentReferenceGeneric, FirebaseDocumentSnapshotGeneric, FirebaseQueryDocumentSnapshotGeneric, FirebaseTimestampGeneric } from '../../../shared/flitModelsDependencyInjection';
|
|
3
3
|
export declare class FeriadoFirestoreData implements FeriadoBase {
|
|
4
4
|
data: FirebaseTimestampGeneric;
|
|
5
5
|
descricao: string;
|
|
6
6
|
excluido: boolean;
|
|
7
7
|
importacao_id: string;
|
|
8
8
|
municipio: string;
|
|
9
|
+
departamento_ref?: FirebaseDocumentReferenceGeneric;
|
|
9
10
|
tipo: FeriadoTipoEnum;
|
|
10
11
|
todas_empresas: boolean;
|
|
11
12
|
uf: string;
|
|
@@ -17,7 +17,7 @@ var FeriadoFireConvert = /** @class */ (function () {
|
|
|
17
17
|
function FeriadoFireConvert() {
|
|
18
18
|
}
|
|
19
19
|
FeriadoFireConvert.fromFirestore = function (doc) {
|
|
20
|
-
var _a, _b;
|
|
20
|
+
var _a, _b, _c;
|
|
21
21
|
return new _1.Feriado({
|
|
22
22
|
_id: (_a = doc.id) !== null && _a !== void 0 ? _a : null,
|
|
23
23
|
_path: (_b = doc.ref.path) !== null && _b !== void 0 ? _b : null,
|
|
@@ -28,22 +28,27 @@ var FeriadoFireConvert = /** @class */ (function () {
|
|
|
28
28
|
excluido: boolean_helper_1.BooleanHelper.check(doc.get('excluido'), false),
|
|
29
29
|
importacao_id: string_helper_1.StringHelper.trim(doc.get('importacao_id'), null),
|
|
30
30
|
municipio: string_helper_1.StringHelper.trim(doc.get('municipio'), null),
|
|
31
|
+
departamento_ref: ((_c = doc.get('departamento_ref')) === null || _c === void 0 ? void 0 : _c.path) || null,
|
|
31
32
|
tipo: string_helper_1.StringHelper.trim(doc.get('tipo'), null),
|
|
32
33
|
todas_empresas: boolean_helper_1.BooleanHelper.check(doc.get('todas_empresas'), true),
|
|
33
34
|
uf: string_helper_1.StringHelper.trim(doc.get('uf'), null),
|
|
34
35
|
});
|
|
35
36
|
};
|
|
36
37
|
FeriadoFireConvert.toFirestore = function (feriado) {
|
|
37
|
-
|
|
38
|
+
var feriadoFirestoreData = {
|
|
38
39
|
data: flitModelsDependencyInjection_1.FlitModelsDependencyInjection.TimestampFromDate(feriado.data),
|
|
39
40
|
descricao: string_helper_1.StringHelper.trim(feriado.descricao, null),
|
|
40
41
|
excluido: boolean_helper_1.BooleanHelper.check(feriado.excluido, false),
|
|
41
42
|
importacao_id: string_helper_1.StringHelper.trim(feriado.importacao_id, null),
|
|
42
43
|
municipio: string_helper_1.StringHelper.trim(feriado.municipio, null),
|
|
44
|
+
departamento_ref: feriado.departamento_ref
|
|
45
|
+
? flitModelsDependencyInjection_1.FlitModelsDependencyInjection.DocumentReferenceFromPath(feriado.departamento_ref)
|
|
46
|
+
: null,
|
|
43
47
|
tipo: string_helper_1.StringHelper.trim(feriado.tipo, null),
|
|
44
48
|
todas_empresas: boolean_helper_1.BooleanHelper.check(feriado.todas_empresas, true),
|
|
45
49
|
uf: string_helper_1.StringHelper.trim(feriado.uf, null),
|
|
46
|
-
}
|
|
50
|
+
};
|
|
51
|
+
return (0, lodash_1.omitBy)(feriadoFirestoreData, lodash_1.isUndefined);
|
|
47
52
|
};
|
|
48
53
|
return FeriadoFireConvert;
|
|
49
54
|
}());
|
|
@@ -25,6 +25,7 @@ var FeriadoJsonConvert = /** @class */ (function () {
|
|
|
25
25
|
excluido: boolean_helper_1.BooleanHelper.check(obj.excluido, false),
|
|
26
26
|
importacao_id: string_helper_1.StringHelper.trim(obj.importacao_id, null),
|
|
27
27
|
municipio: string_helper_1.StringHelper.trim(obj.municipio, null),
|
|
28
|
+
departamento_ref: string_helper_1.StringHelper.check(obj.departamento_ref, null),
|
|
28
29
|
tipo: string_helper_1.StringHelper.trim(obj.tipo, null),
|
|
29
30
|
todas_empresas: boolean_helper_1.BooleanHelper.check(obj.todas_empresas, true),
|
|
30
31
|
uf: string_helper_1.StringHelper.trim(obj.uf, null),
|
|
@@ -40,6 +41,7 @@ var FeriadoJsonConvert = /** @class */ (function () {
|
|
|
40
41
|
excluido: boolean_helper_1.BooleanHelper.check(feriado.excluido, false),
|
|
41
42
|
importacao_id: string_helper_1.StringHelper.trim(feriado.importacao_id, null),
|
|
42
43
|
municipio: string_helper_1.StringHelper.trim(feriado.municipio, null),
|
|
44
|
+
departamento_ref: string_helper_1.StringHelper.check(feriado.departamento_ref, null),
|
|
43
45
|
tipo: string_helper_1.StringHelper.trim(feriado.tipo, null),
|
|
44
46
|
todas_empresas: boolean_helper_1.BooleanHelper.check(feriado.todas_empresas, true),
|
|
45
47
|
uf: string_helper_1.StringHelper.trim(feriado.uf, null),
|
|
@@ -13,6 +13,7 @@ export interface FeriadoBase {
|
|
|
13
13
|
excluido: any;
|
|
14
14
|
importacao_id: any;
|
|
15
15
|
municipio: any;
|
|
16
|
+
departamento_ref?: any;
|
|
16
17
|
tipo: any;
|
|
17
18
|
todas_empresas: any;
|
|
18
19
|
uf: any;
|
|
@@ -31,6 +32,7 @@ export declare class Feriado implements FeriadoBase {
|
|
|
31
32
|
excluido: boolean;
|
|
32
33
|
importacao_id: string;
|
|
33
34
|
municipio: string;
|
|
35
|
+
departamento_ref?: string;
|
|
34
36
|
tipo: FeriadoTipoEnum;
|
|
35
37
|
todas_empresas: boolean;
|
|
36
38
|
uf: string;
|
|
@@ -38,7 +38,7 @@ var Feriado = /** @class */ (function () {
|
|
|
38
38
|
* @memberof Feriado
|
|
39
39
|
*/
|
|
40
40
|
function Feriado(feriadoPayload) {
|
|
41
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
41
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
42
42
|
this._id = (_a = feriadoPayload._id) !== null && _a !== void 0 ? _a : undefined;
|
|
43
43
|
this._path = (_b = feriadoPayload._path) !== null && _b !== void 0 ? _b : undefined;
|
|
44
44
|
this.data = (_c = feriadoPayload.data) !== null && _c !== void 0 ? _c : undefined;
|
|
@@ -46,9 +46,10 @@ var Feriado = /** @class */ (function () {
|
|
|
46
46
|
this.excluido = (_e = feriadoPayload.excluido) !== null && _e !== void 0 ? _e : undefined;
|
|
47
47
|
this.importacao_id = (_f = feriadoPayload.importacao_id) !== null && _f !== void 0 ? _f : undefined;
|
|
48
48
|
this.municipio = (_g = feriadoPayload.municipio) !== null && _g !== void 0 ? _g : undefined;
|
|
49
|
-
this.
|
|
50
|
-
this.
|
|
51
|
-
this.
|
|
49
|
+
this.departamento_ref = (_h = feriadoPayload.departamento_ref) !== null && _h !== void 0 ? _h : undefined;
|
|
50
|
+
this.tipo = (_j = feriadoPayload.tipo) !== null && _j !== void 0 ? _j : undefined;
|
|
51
|
+
this.todas_empresas = (_k = feriadoPayload.todas_empresas) !== null && _k !== void 0 ? _k : undefined;
|
|
52
|
+
this.uf = (_l = feriadoPayload.uf) !== null && _l !== void 0 ? _l : undefined;
|
|
52
53
|
}
|
|
53
54
|
return Feriado;
|
|
54
55
|
}());
|
|
@@ -19,7 +19,9 @@ var LancamentoElasticConvert = /** @class */ (function () {
|
|
|
19
19
|
colaboradores_ids: array_helpers_1.ArrayHelper.checkStringArray(docData.colaboradores_ids, []),
|
|
20
20
|
data_atualizacao: date_helper_1.DateHelper.fromString(docData.data_atualizacao, new Date()),
|
|
21
21
|
data_criacao: date_helper_1.DateHelper.fromString(docData.data_criacao, new Date()),
|
|
22
|
-
data_final:
|
|
22
|
+
data_final: docData.data_final
|
|
23
|
+
? date_helper_1.DateHelper.fromString(docData.data_final, new Date())
|
|
24
|
+
: null,
|
|
23
25
|
data_inicial: date_helper_1.DateHelper.fromString(docData.data_inicial, new Date()) || null,
|
|
24
26
|
descricao: string_helper_1.StringHelper.trim(docData.descricao, null),
|
|
25
27
|
empresa: {
|
|
@@ -5,7 +5,7 @@ export declare class LancamentoFirestoreData implements LancamentoBase {
|
|
|
5
5
|
data_criacao: FirebaseTimestampGeneric;
|
|
6
6
|
data_atualizacao: FirebaseTimestampGeneric;
|
|
7
7
|
data_inicial: FirebaseTimestampGeneric;
|
|
8
|
-
data_final: FirebaseTimestampGeneric;
|
|
8
|
+
data_final: FirebaseTimestampGeneric | null;
|
|
9
9
|
descricao: string;
|
|
10
10
|
excluido: boolean;
|
|
11
11
|
acao_tipo: TipoAcaoLancamentoEnum;
|
|
@@ -55,7 +55,9 @@ var LancamentoFireConvert = /** @class */ (function () {
|
|
|
55
55
|
var _a;
|
|
56
56
|
var lancamentoFire = {
|
|
57
57
|
data_inicial: flitModelsDependencyInjection_1.FlitModelsDependencyInjection.TimestampFromDate(lancamento.data_inicial),
|
|
58
|
-
data_final:
|
|
58
|
+
data_final: lancamento.data_final
|
|
59
|
+
? flitModelsDependencyInjection_1.FlitModelsDependencyInjection.TimestampFromDate(lancamento.data_final)
|
|
60
|
+
: null,
|
|
59
61
|
colaboradores_ids: array_helpers_1.ArrayHelper.checkStringArray(lancamento.colaboradores_ids, null),
|
|
60
62
|
descricao: string_helper_1.StringHelper.trim(lancamento.descricao, null),
|
|
61
63
|
excluido: boolean_helper_1.BooleanHelper.check(lancamento.excluido, false),
|
|
@@ -22,7 +22,9 @@ var LancamentoJsonConvert = /** @class */ (function () {
|
|
|
22
22
|
_id: (_a = obj._id) !== null && _a !== void 0 ? _a : null,
|
|
23
23
|
_path: (_b = obj._path) !== null && _b !== void 0 ? _b : null,
|
|
24
24
|
data_inicial: date_helper_1.DateHelper.fromString(obj.data_inicial, null),
|
|
25
|
-
data_final:
|
|
25
|
+
data_final: obj.data_final
|
|
26
|
+
? date_helper_1.DateHelper.fromString(obj.data_final, null)
|
|
27
|
+
: null,
|
|
26
28
|
descricao: string_helper_1.StringHelper.trim(obj.descricao, null),
|
|
27
29
|
excluido: boolean_helper_1.BooleanHelper.check(obj.excluido, false),
|
|
28
30
|
status: string_helper_1.StringHelper.trim(obj.status, null),
|
|
@@ -56,7 +58,9 @@ var LancamentoJsonConvert = /** @class */ (function () {
|
|
|
56
58
|
_id: (_a = lancamento._id) !== null && _a !== void 0 ? _a : null,
|
|
57
59
|
_path: (_b = lancamento._path) !== null && _b !== void 0 ? _b : null,
|
|
58
60
|
data_inicial: (_c = lancamento.data_inicial) === null || _c === void 0 ? void 0 : _c.toISOString(),
|
|
59
|
-
data_final:
|
|
61
|
+
data_final: lancamento.data_final
|
|
62
|
+
? (_d = lancamento.data_final) === null || _d === void 0 ? void 0 : _d.toISOString()
|
|
63
|
+
: null,
|
|
60
64
|
descricao: string_helper_1.StringHelper.trim(lancamento.descricao, null),
|
|
61
65
|
excluido: boolean_helper_1.BooleanHelper.check(lancamento.excluido, false),
|
|
62
66
|
status: string_helper_1.StringHelper.trim(lancamento.status, null),
|