flit-models 2.1.22 → 2.1.25
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/lancamento/index.d.ts +1 -0
- package/lib/models/contas/lancamento/index.js +1 -0
- package/lib/models/contas/lancamento/lancamento-fire-convert.js +8 -8
- package/lib/models/contas/lancamento/lancamento-json-convert.d.ts +2 -2
- package/lib/models/contas/lancamento/lancamento-json-convert.js +8 -8
- package/package.json +1 -1
|
@@ -33,6 +33,7 @@ var TipoAcaoLancamentoEnum;
|
|
|
33
33
|
TipoAcaoLancamentoEnum["AbonoParcial"] = "Abono Parcial";
|
|
34
34
|
TipoAcaoLancamentoEnum["Afastado"] = "Afastado";
|
|
35
35
|
TipoAcaoLancamentoEnum["Atestado"] = "Atestado";
|
|
36
|
+
TipoAcaoLancamentoEnum["AtestadoParcial"] = "Atestado Parcial";
|
|
36
37
|
TipoAcaoLancamentoEnum["DiaTrabalhado"] = "Dia trabalhado";
|
|
37
38
|
TipoAcaoLancamentoEnum["Falta"] = "Falta";
|
|
38
39
|
TipoAcaoLancamentoEnum["FaltaBH"] = "Falta BH";
|
|
@@ -49,11 +49,11 @@ var LancamentoFireConvert = /** @class */ (function () {
|
|
|
49
49
|
periodos: ((_d = doc.get('periodos')) === null || _d === void 0 ? void 0 : _d.length) ? doc.get('periodos') : null,
|
|
50
50
|
data_atualizacao: (0, type_guards_1.TipoTimestampFirestore)(doc.get('data_atualizacao'))
|
|
51
51
|
? doc.get('data_atualizacao').toDate()
|
|
52
|
-
:
|
|
52
|
+
: undefined,
|
|
53
53
|
data_criacao: (0, type_guards_1.TipoTimestampFirestore)(doc.get('data_criacao'))
|
|
54
54
|
? doc.get('data_criacao').toDate()
|
|
55
|
-
:
|
|
56
|
-
data_intervalo: array_helpers_1.ArrayHelper.checkStringArray(doc.get('data_intervalo'),
|
|
55
|
+
: undefined,
|
|
56
|
+
data_intervalo: array_helpers_1.ArrayHelper.checkStringArray(doc.get('data_intervalo'), undefined),
|
|
57
57
|
});
|
|
58
58
|
};
|
|
59
59
|
LancamentoFireConvert.toFirestore = function (lancamento, documentReferenceFromPath, timestampfromDate) {
|
|
@@ -73,7 +73,7 @@ var LancamentoFireConvert = /** @class */ (function () {
|
|
|
73
73
|
: lancamento.data_final
|
|
74
74
|
? firestore_1.Timestamp.fromDate(lancamento.data_final)
|
|
75
75
|
: null,
|
|
76
|
-
data_intervalo: array_helpers_1.ArrayHelper.checkStringArray(lancamento.data_intervalo,
|
|
76
|
+
data_intervalo: array_helpers_1.ArrayHelper.checkStringArray(lancamento.data_intervalo, undefined),
|
|
77
77
|
descricao: string_helper_1.StringHelper.trim(lancamento.descricao, null),
|
|
78
78
|
excluido: boolean_helper_1.BooleanHelper.check(lancamento.excluido, false),
|
|
79
79
|
acao_tipo: string_helper_1.StringHelper.trim(lancamento.acao_tipo, null),
|
|
@@ -96,17 +96,17 @@ var LancamentoFireConvert = /** @class */ (function () {
|
|
|
96
96
|
data_atualizacao: timestampfromDate
|
|
97
97
|
? lancamento.data_atualizacao
|
|
98
98
|
? timestampfromDate(lancamento.data_atualizacao)
|
|
99
|
-
:
|
|
99
|
+
: undefined
|
|
100
100
|
: lancamento.data_atualizacao
|
|
101
101
|
? firestore_1.Timestamp.fromDate(lancamento.data_atualizacao)
|
|
102
|
-
:
|
|
102
|
+
: undefined,
|
|
103
103
|
data_criacao: timestampfromDate
|
|
104
104
|
? lancamento.data_criacao
|
|
105
105
|
? timestampfromDate(lancamento.data_criacao)
|
|
106
|
-
:
|
|
106
|
+
: undefined
|
|
107
107
|
: lancamento.data_criacao
|
|
108
108
|
? firestore_1.Timestamp.fromDate(lancamento.data_criacao)
|
|
109
|
-
:
|
|
109
|
+
: undefined,
|
|
110
110
|
};
|
|
111
111
|
return (0, lodash_1.omitBy)(lancamentoFire, lodash_1.isUndefined);
|
|
112
112
|
};
|
|
@@ -25,12 +25,12 @@ export declare class LancamentoJsonData implements LancamentoBase {
|
|
|
25
25
|
excluido: boolean;
|
|
26
26
|
acao_tipo: TipoAcaoLancamentoEnum;
|
|
27
27
|
ocorrencia: {
|
|
28
|
-
path
|
|
28
|
+
path: string;
|
|
29
29
|
tipo: TipoOcorrenciaFrequenciaEnum;
|
|
30
30
|
descricao: string;
|
|
31
31
|
};
|
|
32
32
|
empresa: {
|
|
33
|
-
path
|
|
33
|
+
path: string;
|
|
34
34
|
razao: string;
|
|
35
35
|
fantasia: string;
|
|
36
36
|
documento: string;
|
|
@@ -40,7 +40,7 @@ var LancamentoJsonConvert = /** @class */ (function () {
|
|
|
40
40
|
tipo: string_helper_1.StringHelper.trim(obj.ocorrencia.tipo, null),
|
|
41
41
|
}
|
|
42
42
|
: null,
|
|
43
|
-
todos_colaboradores: boolean_helper_1.BooleanHelper.check(obj.
|
|
43
|
+
todos_colaboradores: boolean_helper_1.BooleanHelper.check(obj.todos_colaboradores, true),
|
|
44
44
|
periodos: ((_c = obj.periodos) === null || _c === void 0 ? void 0 : _c.length) ? obj.periodos : null,
|
|
45
45
|
data_atualizacao: date_helper_1.DateHelper.fromString(obj.data_atualizacao, null),
|
|
46
46
|
data_criacao: date_helper_1.DateHelper.fromString(obj.data_criacao, null),
|
|
@@ -48,12 +48,12 @@ var LancamentoJsonConvert = /** @class */ (function () {
|
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
50
|
LancamentoJsonConvert.toJson = function (lancamento) {
|
|
51
|
-
var _a, _b, _c, _d, _e;
|
|
51
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
52
52
|
var lancamentoJson = {
|
|
53
53
|
_id: (_a = lancamento._id) !== null && _a !== void 0 ? _a : null,
|
|
54
54
|
_path: (_b = lancamento._path) !== null && _b !== void 0 ? _b : null,
|
|
55
|
-
data_inicial: lancamento.data_inicial.toISOString(),
|
|
56
|
-
data_final: lancamento.data_final.toISOString(),
|
|
55
|
+
data_inicial: (_c = lancamento.data_inicial) === null || _c === void 0 ? void 0 : _c.toISOString(),
|
|
56
|
+
data_final: (_d = lancamento.data_final) === null || _d === void 0 ? void 0 : _d.toISOString(),
|
|
57
57
|
descricao: string_helper_1.StringHelper.trim(lancamento.descricao, null),
|
|
58
58
|
excluido: boolean_helper_1.BooleanHelper.check(lancamento.excluido, false),
|
|
59
59
|
status: string_helper_1.StringHelper.trim(lancamento.status, null),
|
|
@@ -72,10 +72,10 @@ var LancamentoJsonConvert = /** @class */ (function () {
|
|
|
72
72
|
}
|
|
73
73
|
: null,
|
|
74
74
|
todos_colaboradores: boolean_helper_1.BooleanHelper.check(lancamento.todos_colaboradores, false),
|
|
75
|
-
periodos: ((
|
|
76
|
-
data_criacao: (
|
|
77
|
-
data_atualizacao: (
|
|
78
|
-
data_intervalo: array_helpers_1.ArrayHelper.checkStringArray(lancamento.data_intervalo,
|
|
75
|
+
periodos: ((_e = lancamento.periodos) === null || _e === void 0 ? void 0 : _e.length) ? lancamento.periodos : null,
|
|
76
|
+
data_criacao: (_f = lancamento.data_criacao) === null || _f === void 0 ? void 0 : _f.toISOString(),
|
|
77
|
+
data_atualizacao: (_g = lancamento.data_atualizacao) === null || _g === void 0 ? void 0 : _g.toISOString(),
|
|
78
|
+
data_intervalo: array_helpers_1.ArrayHelper.checkStringArray(lancamento.data_intervalo, undefined),
|
|
79
79
|
};
|
|
80
80
|
return (0, lodash_1.omitBy)(lancamentoJson, lodash_1.isUndefined);
|
|
81
81
|
};
|