flit-models 3.2.49 → 3.2.51
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.
|
@@ -19,7 +19,7 @@ var FeriadoFireConvert = /** @class */ (function () {
|
|
|
19
19
|
FeriadoFireConvert.fromFirestore = function (doc) {
|
|
20
20
|
var _a, _b, _c;
|
|
21
21
|
var departamentos = [];
|
|
22
|
-
((_a = doc.get('
|
|
22
|
+
((_a = doc.get('departamentos_ids')) !== null && _a !== void 0 ? _a : []).forEach(function (departamento) {
|
|
23
23
|
if (departamento === null || departamento === void 0 ? void 0 : departamento.path) {
|
|
24
24
|
departamentos.push(departamento.path);
|
|
25
25
|
}
|
|
@@ -47,11 +47,11 @@ var LancamentoFireConvert = /** @class */ (function () {
|
|
|
47
47
|
data_criacao: (_p = (_o = docData.data_criacao) === null || _o === void 0 ? void 0 : _o.toDate()) !== null && _p !== void 0 ? _p : undefined,
|
|
48
48
|
colaboradores_ids: array_helpers_1.ArrayHelper.checkStringArray(docData.colaboradores_ids, null),
|
|
49
49
|
integracao: docData.integracao
|
|
50
|
-
? {
|
|
50
|
+
? (0, lodash_1.omitBy)({
|
|
51
51
|
id: docData.integracao.id,
|
|
52
52
|
tipo: docData.integracao.tipo,
|
|
53
53
|
detalhes: docData.integracao.detalhes,
|
|
54
|
-
}
|
|
54
|
+
}, lodash_1.isUndefined)
|
|
55
55
|
: undefined,
|
|
56
56
|
});
|
|
57
57
|
};
|
|
@@ -85,11 +85,11 @@ var LancamentoFireConvert = /** @class */ (function () {
|
|
|
85
85
|
data_atualizacao: flitModelsDependencyInjection_1.FlitModelsDependencyInjection.TimestampFromDate(lancamento.data_atualizacao),
|
|
86
86
|
data_criacao: flitModelsDependencyInjection_1.FlitModelsDependencyInjection.TimestampFromDate(lancamento.data_criacao),
|
|
87
87
|
integracao: lancamento.integracao
|
|
88
|
-
? {
|
|
88
|
+
? (0, lodash_1.omitBy)({
|
|
89
89
|
id: lancamento.integracao.id,
|
|
90
90
|
tipo: lancamento.integracao.tipo,
|
|
91
91
|
detalhes: lancamento.integracao.detalhes,
|
|
92
|
-
}
|
|
92
|
+
}, lodash_1.isUndefined)
|
|
93
93
|
: undefined,
|
|
94
94
|
};
|
|
95
95
|
return (0, lodash_1.omitBy)(lancamentoFire, lodash_1.isUndefined);
|
|
@@ -17,7 +17,7 @@ var LancamentoJsonConvert = /** @class */ (function () {
|
|
|
17
17
|
function LancamentoJsonConvert() {
|
|
18
18
|
}
|
|
19
19
|
LancamentoJsonConvert.fromJson = function (obj) {
|
|
20
|
-
var _a, _b, _c
|
|
20
|
+
var _a, _b, _c;
|
|
21
21
|
return new _1.Lancamento({
|
|
22
22
|
_id: (_a = obj._id) !== null && _a !== void 0 ? _a : null,
|
|
23
23
|
_path: (_b = obj._path) !== null && _b !== void 0 ? _b : null,
|
|
@@ -48,11 +48,11 @@ var LancamentoJsonConvert = /** @class */ (function () {
|
|
|
48
48
|
data_criacao: date_helper_1.DateHelper.fromString(obj.data_criacao, null),
|
|
49
49
|
colaboradores_ids: array_helpers_1.ArrayHelper.checkStringArray(obj.colaboradores_ids, null),
|
|
50
50
|
integracao: obj.integracao
|
|
51
|
-
? {
|
|
51
|
+
? (0, lodash_1.omitBy)({
|
|
52
52
|
id: obj.integracao.id,
|
|
53
53
|
tipo: obj.integracao.tipo,
|
|
54
|
-
detalhes:
|
|
55
|
-
}
|
|
54
|
+
detalhes: obj.integracao.detalhes,
|
|
55
|
+
}, lodash_1.isUndefined)
|
|
56
56
|
: undefined,
|
|
57
57
|
});
|
|
58
58
|
};
|
|
@@ -88,11 +88,11 @@ var LancamentoJsonConvert = /** @class */ (function () {
|
|
|
88
88
|
data_atualizacao: (_g = lancamento.data_atualizacao) === null || _g === void 0 ? void 0 : _g.toISOString(),
|
|
89
89
|
colaboradores_ids: array_helpers_1.ArrayHelper.checkStringArray(lancamento.colaboradores_ids, undefined),
|
|
90
90
|
integracao: lancamento.integracao
|
|
91
|
-
? {
|
|
91
|
+
? (0, lodash_1.omitBy)({
|
|
92
92
|
id: lancamento.integracao.id,
|
|
93
93
|
tipo: lancamento.integracao.tipo,
|
|
94
94
|
detalhes: lancamento.integracao.detalhes,
|
|
95
|
-
}
|
|
95
|
+
}, lodash_1.isUndefined)
|
|
96
96
|
: undefined,
|
|
97
97
|
};
|
|
98
98
|
return (0, lodash_1.omitBy)(lancamentoJson, lodash_1.isUndefined);
|