flit-models 3.2.33 → 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/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
|
}());
|