flit-models 3.0.2 → 3.0.5
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/index.d.ts +1 -1
- package/lib/index.js +14 -3
- package/lib/models/contas/escala/escala-fire-convert.d.ts +5 -0
- package/lib/models/contas/escala/escala-fire-convert.js +34 -21
- package/lib/models/contas/escala/index.d.ts +10 -0
- package/lib/models/contas/escala/index.js +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { EmpresaFeriado, EmpresaFeriadoBase, EmpresaFeriadoFireConvert, EmpresaFeriadoFirestoreData, EnumExcecaoStatus, EnumExcecaoTipo, Excecao, Feriado, FeriadoBase, FeriadoFireConvert, FeriadoFirestoreData, FeriadoJsonConvert, FeriadoJsonData, FeriadoTipoEnum, IExcecao, Lancamento, LancamentoBase, LancamentoFireConvert, LancamentoFirestoreData, LancamentoJsonConvert, LancamentoJsonData, LancamentoStatusEnum,
|
|
1
|
+
export { Cargo, CargoBase, CargoFireConvert, CargoFirestoreData, Departamento, DepartamentoBase, DepartamentoFireConvert, DepartamentoFirestoreData, EmpresaFeriado, EmpresaFeriadoBase, EmpresaFeriadoFireConvert, EmpresaFeriadoFirestoreData, EnumExcecaoStatus, EnumExcecaoTipo, Escala, EscalaBase, EscalaFireConvert, EscalaFirestoreData, Excecao, Feriado, FeriadoBase, FeriadoFireConvert, FeriadoFirestoreData, FeriadoJsonConvert, FeriadoJsonData, FeriadoTipoEnum, IExcecao, Lancamento, LancamentoBase, LancamentoFireConvert, LancamentoFirestoreData, LancamentoJsonConvert, LancamentoJsonData, LancamentoPeriodo, LancamentoPeriodoBase, LancamentoStatusEnum, OcorrenciaFrequenciaCopiaEmDocumento, OcorrenciaFrequenciaRelacaoJornadas, OcorrenciaFrequenciaRelacaoJornadasValue, TipoAcaoLancamentoEnum, TipoOcorrenciaFrequenciaEnum, TipoReferenciaVerificacaoLancamento, VerificacaoLancamento, VerificacaoLancamentoBase, VerificacaoLancamentoFireConvert, VerificacaoLancamentoFirestoreData, } from './models/index';
|
package/lib/index.js
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VerificacaoLancamento = exports.TipoReferenciaVerificacaoLancamento = exports.TipoOcorrenciaFrequenciaEnum = exports.TipoAcaoLancamentoEnum = exports.
|
|
3
|
+
exports.VerificacaoLancamentoFirestoreData = exports.VerificacaoLancamentoFireConvert = exports.VerificacaoLancamento = exports.TipoReferenciaVerificacaoLancamento = exports.TipoOcorrenciaFrequenciaEnum = exports.TipoAcaoLancamentoEnum = exports.OcorrenciaFrequenciaRelacaoJornadas = exports.LancamentoStatusEnum = exports.LancamentoPeriodo = exports.LancamentoJsonData = exports.LancamentoJsonConvert = exports.LancamentoFirestoreData = exports.LancamentoFireConvert = exports.Lancamento = exports.FeriadoTipoEnum = exports.FeriadoJsonData = exports.FeriadoJsonConvert = exports.FeriadoFirestoreData = exports.FeriadoFireConvert = exports.Feriado = exports.Excecao = exports.EscalaFirestoreData = exports.EscalaFireConvert = exports.Escala = exports.EnumExcecaoTipo = exports.EnumExcecaoStatus = exports.EmpresaFeriadoFirestoreData = exports.EmpresaFeriadoFireConvert = exports.EmpresaFeriado = exports.DepartamentoFirestoreData = exports.DepartamentoFireConvert = exports.Departamento = exports.CargoFirestoreData = exports.CargoFireConvert = exports.Cargo = void 0;
|
|
4
4
|
var index_1 = require("./models/index");
|
|
5
|
+
Object.defineProperty(exports, "Cargo", { enumerable: true, get: function () { return index_1.Cargo; } });
|
|
6
|
+
Object.defineProperty(exports, "CargoFireConvert", { enumerable: true, get: function () { return index_1.CargoFireConvert; } });
|
|
7
|
+
Object.defineProperty(exports, "CargoFirestoreData", { enumerable: true, get: function () { return index_1.CargoFirestoreData; } });
|
|
8
|
+
Object.defineProperty(exports, "Departamento", { enumerable: true, get: function () { return index_1.Departamento; } });
|
|
9
|
+
Object.defineProperty(exports, "DepartamentoFireConvert", { enumerable: true, get: function () { return index_1.DepartamentoFireConvert; } });
|
|
10
|
+
Object.defineProperty(exports, "DepartamentoFirestoreData", { enumerable: true, get: function () { return index_1.DepartamentoFirestoreData; } });
|
|
5
11
|
Object.defineProperty(exports, "EmpresaFeriado", { enumerable: true, get: function () { return index_1.EmpresaFeriado; } });
|
|
6
12
|
Object.defineProperty(exports, "EmpresaFeriadoFireConvert", { enumerable: true, get: function () { return index_1.EmpresaFeriadoFireConvert; } });
|
|
7
13
|
Object.defineProperty(exports, "EmpresaFeriadoFirestoreData", { enumerable: true, get: function () { return index_1.EmpresaFeriadoFirestoreData; } });
|
|
8
14
|
Object.defineProperty(exports, "EnumExcecaoStatus", { enumerable: true, get: function () { return index_1.EnumExcecaoStatus; } });
|
|
9
15
|
Object.defineProperty(exports, "EnumExcecaoTipo", { enumerable: true, get: function () { return index_1.EnumExcecaoTipo; } });
|
|
16
|
+
Object.defineProperty(exports, "Escala", { enumerable: true, get: function () { return index_1.Escala; } });
|
|
17
|
+
Object.defineProperty(exports, "EscalaFireConvert", { enumerable: true, get: function () { return index_1.EscalaFireConvert; } });
|
|
18
|
+
Object.defineProperty(exports, "EscalaFirestoreData", { enumerable: true, get: function () { return index_1.EscalaFirestoreData; } });
|
|
10
19
|
Object.defineProperty(exports, "Excecao", { enumerable: true, get: function () { return index_1.Excecao; } });
|
|
11
20
|
Object.defineProperty(exports, "Feriado", { enumerable: true, get: function () { return index_1.Feriado; } });
|
|
12
21
|
Object.defineProperty(exports, "FeriadoFireConvert", { enumerable: true, get: function () { return index_1.FeriadoFireConvert; } });
|
|
@@ -19,10 +28,12 @@ Object.defineProperty(exports, "LancamentoFireConvert", { enumerable: true, get:
|
|
|
19
28
|
Object.defineProperty(exports, "LancamentoFirestoreData", { enumerable: true, get: function () { return index_1.LancamentoFirestoreData; } });
|
|
20
29
|
Object.defineProperty(exports, "LancamentoJsonConvert", { enumerable: true, get: function () { return index_1.LancamentoJsonConvert; } });
|
|
21
30
|
Object.defineProperty(exports, "LancamentoJsonData", { enumerable: true, get: function () { return index_1.LancamentoJsonData; } });
|
|
31
|
+
Object.defineProperty(exports, "LancamentoPeriodo", { enumerable: true, get: function () { return index_1.LancamentoPeriodo; } });
|
|
22
32
|
Object.defineProperty(exports, "LancamentoStatusEnum", { enumerable: true, get: function () { return index_1.LancamentoStatusEnum; } });
|
|
23
|
-
Object.defineProperty(exports, "
|
|
24
|
-
Object.defineProperty(exports, "VerificacaoLancamentoFirestoreData", { enumerable: true, get: function () { return index_1.VerificacaoLancamentoFirestoreData; } });
|
|
33
|
+
Object.defineProperty(exports, "OcorrenciaFrequenciaRelacaoJornadas", { enumerable: true, get: function () { return index_1.OcorrenciaFrequenciaRelacaoJornadas; } });
|
|
25
34
|
Object.defineProperty(exports, "TipoAcaoLancamentoEnum", { enumerable: true, get: function () { return index_1.TipoAcaoLancamentoEnum; } });
|
|
26
35
|
Object.defineProperty(exports, "TipoOcorrenciaFrequenciaEnum", { enumerable: true, get: function () { return index_1.TipoOcorrenciaFrequenciaEnum; } });
|
|
27
36
|
Object.defineProperty(exports, "TipoReferenciaVerificacaoLancamento", { enumerable: true, get: function () { return index_1.TipoReferenciaVerificacaoLancamento; } });
|
|
28
37
|
Object.defineProperty(exports, "VerificacaoLancamento", { enumerable: true, get: function () { return index_1.VerificacaoLancamento; } });
|
|
38
|
+
Object.defineProperty(exports, "VerificacaoLancamentoFireConvert", { enumerable: true, get: function () { return index_1.VerificacaoLancamentoFireConvert; } });
|
|
39
|
+
Object.defineProperty(exports, "VerificacaoLancamentoFirestoreData", { enumerable: true, get: function () { return index_1.VerificacaoLancamentoFirestoreData; } });
|
|
@@ -6,7 +6,12 @@ export declare class EscalaFirestoreData implements EscalaBase {
|
|
|
6
6
|
data_inicial: FirebaseTimestampGeneric;
|
|
7
7
|
descricao: string;
|
|
8
8
|
excluido: boolean;
|
|
9
|
+
existe_marcacao_pre_assinalada: boolean;
|
|
9
10
|
jornadas: {
|
|
11
|
+
marcacoes_pre_assinaladas?: {
|
|
12
|
+
todos_intervalos: boolean;
|
|
13
|
+
indices: number[];
|
|
14
|
+
};
|
|
10
15
|
repetir: number;
|
|
11
16
|
ocorrencia_frequencia_ref: FirebaseDocumentReferenceGeneric;
|
|
12
17
|
periodos: {
|
|
@@ -14,7 +14,7 @@ var EscalaFireConvert = /** @class */ (function () {
|
|
|
14
14
|
function EscalaFireConvert() {
|
|
15
15
|
}
|
|
16
16
|
EscalaFireConvert.fromFirestore = function (doc) {
|
|
17
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
17
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
18
18
|
var docData = ((_a = doc.data()) !== null && _a !== void 0 ? _a : {});
|
|
19
19
|
return new _1.Escala({
|
|
20
20
|
_id: (_b = doc.id) !== null && _b !== void 0 ? _b : null,
|
|
@@ -24,10 +24,15 @@ var EscalaFireConvert = /** @class */ (function () {
|
|
|
24
24
|
data_inicial: ((_f = docData.data_inicial) === null || _f === void 0 ? void 0 : _f.toDate()) || null,
|
|
25
25
|
descricao: (_g = docData.descricao) !== null && _g !== void 0 ? _g : null,
|
|
26
26
|
excluido: (_h = docData.excluido) !== null && _h !== void 0 ? _h : false,
|
|
27
|
+
existe_marcacao_pre_assinalada: (_j = docData.existe_marcacao_pre_assinalada) !== null && _j !== void 0 ? _j : false,
|
|
27
28
|
jornadas: docData.jornadas.map(function (jornada) {
|
|
28
|
-
var _a;
|
|
29
|
+
var _a, _b, _c;
|
|
29
30
|
return ({
|
|
30
|
-
|
|
31
|
+
marcacoes_pre_assinaladas: {
|
|
32
|
+
indices: (_a = jornada.marcacoes_pre_assinaladas.indices) !== null && _a !== void 0 ? _a : null,
|
|
33
|
+
todos_intervalos: (_b = jornada.marcacoes_pre_assinaladas.todos_intervalos) !== null && _b !== void 0 ? _b : false,
|
|
34
|
+
},
|
|
35
|
+
ocorrencia_frequencia_ref: ((_c = jornada.ocorrencia_frequencia_ref) === null || _c === void 0 ? void 0 : _c.path) || null,
|
|
31
36
|
periodos: jornada.periodos.map(function (periodo) {
|
|
32
37
|
var _a;
|
|
33
38
|
return ({
|
|
@@ -55,27 +60,35 @@ var EscalaFireConvert = /** @class */ (function () {
|
|
|
55
60
|
var escalaFire = {
|
|
56
61
|
data_atualizacao_doc: flitModelsDependencyInjection_1.FlitModelsDependencyInjection.TimestampFromDate(escala.data_atualizacao_doc),
|
|
57
62
|
data_criacao_doc: flitModelsDependencyInjection_1.FlitModelsDependencyInjection.TimestampFromDate(escala.data_criacao_doc),
|
|
58
|
-
data_inicial: flitModelsDependencyInjection_1.FlitModelsDependencyInjection.TimestampFromDate(escala.
|
|
63
|
+
data_inicial: flitModelsDependencyInjection_1.FlitModelsDependencyInjection.TimestampFromDate(escala.data_inicial),
|
|
64
|
+
existe_marcacao_pre_assinalada: escala.existe_marcacao_pre_assinalada,
|
|
59
65
|
descricao: escala.descricao,
|
|
60
66
|
excluido: (_a = escala.excluido) !== null && _a !== void 0 ? _a : false,
|
|
61
|
-
jornadas: escala.jornadas.map(function (jornada) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
timezone_value: periodo.entrada.timezone_value,
|
|
68
|
-
},
|
|
69
|
-
saida: {
|
|
70
|
-
data_relativa: flitModelsDependencyInjection_1.FlitModelsDependencyInjection.TimestampFromDate(periodo.saida.data_relativa) || null,
|
|
71
|
-
hora: periodo.saida.hora,
|
|
72
|
-
timezone_value: periodo.saida.timezone_value,
|
|
67
|
+
jornadas: escala.jornadas.map(function (jornada) {
|
|
68
|
+
var _a, _b;
|
|
69
|
+
return ({
|
|
70
|
+
marcacoes_pre_assinaladas: {
|
|
71
|
+
indices: (_a = jornada.marcacoes_pre_assinaladas.indices) !== null && _a !== void 0 ? _a : null,
|
|
72
|
+
todos_intervalos: (_b = jornada.marcacoes_pre_assinaladas.todos_intervalos) !== null && _b !== void 0 ? _b : false,
|
|
73
73
|
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
ocorrencia_frequencia_ref: flitModelsDependencyInjection_1.FlitModelsDependencyInjection.DocumentReferenceFromPath(jornada.ocorrencia_frequencia_ref) || null,
|
|
75
|
+
periodos: jornada.periodos.map(function (periodo) { return ({
|
|
76
|
+
entrada: {
|
|
77
|
+
data_relativa: flitModelsDependencyInjection_1.FlitModelsDependencyInjection.TimestampFromDate(periodo.entrada.data_relativa) || null,
|
|
78
|
+
hora: periodo.entrada.hora,
|
|
79
|
+
timezone_value: periodo.entrada.timezone_value,
|
|
80
|
+
},
|
|
81
|
+
saida: {
|
|
82
|
+
data_relativa: flitModelsDependencyInjection_1.FlitModelsDependencyInjection.TimestampFromDate(periodo.saida.data_relativa) || null,
|
|
83
|
+
hora: periodo.saida.hora,
|
|
84
|
+
timezone_value: periodo.saida.timezone_value,
|
|
85
|
+
},
|
|
86
|
+
duracao: periodo.duracao,
|
|
87
|
+
descanso: periodo.descanso,
|
|
88
|
+
}); }),
|
|
89
|
+
repetir: jornada.repetir,
|
|
90
|
+
});
|
|
91
|
+
}),
|
|
79
92
|
};
|
|
80
93
|
return (0, lodash_1.omitBy)(escalaFire, lodash_1.isUndefined);
|
|
81
94
|
};
|
|
@@ -5,9 +5,14 @@ export interface EscalaBase {
|
|
|
5
5
|
data_inicial: any;
|
|
6
6
|
descricao: string;
|
|
7
7
|
excluido: boolean;
|
|
8
|
+
existe_marcacao_pre_assinalada: boolean;
|
|
8
9
|
jornadas: {
|
|
9
10
|
repetir: number;
|
|
10
11
|
ocorrencia_frequencia_ref: any;
|
|
12
|
+
marcacoes_pre_assinaladas?: {
|
|
13
|
+
todos_intervalos: boolean;
|
|
14
|
+
indices: number[];
|
|
15
|
+
};
|
|
11
16
|
periodos: {
|
|
12
17
|
entrada: {
|
|
13
18
|
data_relativa: any;
|
|
@@ -38,9 +43,14 @@ export declare class Escala implements EscalaBase {
|
|
|
38
43
|
data_inicial: Date;
|
|
39
44
|
descricao: string;
|
|
40
45
|
excluido: boolean;
|
|
46
|
+
existe_marcacao_pre_assinalada: boolean;
|
|
41
47
|
jornadas: {
|
|
42
48
|
repetir: number;
|
|
43
49
|
ocorrencia_frequencia_ref: string;
|
|
50
|
+
marcacoes_pre_assinaladas?: {
|
|
51
|
+
todos_intervalos: boolean;
|
|
52
|
+
indices: number[];
|
|
53
|
+
};
|
|
44
54
|
periodos: {
|
|
45
55
|
entrada: {
|
|
46
56
|
data_relativa: Date;
|
|
@@ -31,7 +31,7 @@ var Escala = /** @class */ (function () {
|
|
|
31
31
|
*/
|
|
32
32
|
function Escala(lancamentoPayload) {
|
|
33
33
|
var _this = this;
|
|
34
|
-
var keysOfProps = ["_id", "_path", "descricao", "excluido", "data_inicial", "data_atualizacao_doc", "data_criacao_doc", "jornadas"];
|
|
34
|
+
var keysOfProps = ["_id", "_path", "descricao", "excluido", "data_inicial", "data_atualizacao_doc", "data_criacao_doc", "existe_marcacao_pre_assinalada", "jornadas"];
|
|
35
35
|
keysOfProps.forEach(function (key) {
|
|
36
36
|
_this[key] = lancamentoPayload
|
|
37
37
|
? lancamentoPayload[key]
|