flit-models 3.3.34 → 3.3.35
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.
|
@@ -20,10 +20,10 @@ var DispositivoElasticConvert = /** @class */ (function () {
|
|
|
20
20
|
empresa: docData.empresa ? new empresa_1.Empresa(docData.empresa) : null,
|
|
21
21
|
ativo: boolean_helper_1.BooleanHelper.check(docData.ativo, false),
|
|
22
22
|
autenticacao_id: string_helper_1.StringHelper.trim(docData.autenticacao_id, null),
|
|
23
|
-
conta_ref: (_e = docData.conta_ref) !== null && _e !== void 0 ? _e : null,
|
|
23
|
+
conta_ref: (_e = docData.conta_ref.i_path) !== null && _e !== void 0 ? _e : null,
|
|
24
24
|
descricao: string_helper_1.StringHelper.trim(docData.descricao, null),
|
|
25
25
|
email: string_helper_1.StringHelper.trim(docData.email, null),
|
|
26
|
-
empresa_ref: (_f = docData.empresa_ref) !== null && _f !== void 0 ? _f : null,
|
|
26
|
+
empresa_ref: (_f = docData.empresa_ref.i_path) !== null && _f !== void 0 ? _f : null,
|
|
27
27
|
perimetros_refs: (_g = docData.perimetros_refs) !== null && _g !== void 0 ? _g : [],
|
|
28
28
|
endereco: docData.endereco
|
|
29
29
|
? {
|
|
@@ -5,7 +5,7 @@ export declare class DispositivoFirestoreData implements DispositivoBase {
|
|
|
5
5
|
empresa?: Empresa;
|
|
6
6
|
ativo: boolean;
|
|
7
7
|
autenticacao_id: string;
|
|
8
|
-
conta_ref:
|
|
8
|
+
conta_ref: FirebaseDocumentReferenceGeneric;
|
|
9
9
|
data_atualizacao_doc?: FirebaseTimestampGeneric;
|
|
10
10
|
data_criacao_doc?: FirebaseTimestampGeneric;
|
|
11
11
|
descricao: string;
|
|
@@ -18,7 +18,7 @@ var DispositivoFireConvert = /** @class */ (function () {
|
|
|
18
18
|
function DispositivoFireConvert() {
|
|
19
19
|
}
|
|
20
20
|
DispositivoFireConvert.fromFirestore = function (doc) {
|
|
21
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
21
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
22
22
|
var docData = ((_a = doc.data()) !== null && _a !== void 0 ? _a : {});
|
|
23
23
|
return new _1.Dispositivo({
|
|
24
24
|
_id: doc.id,
|
|
@@ -28,11 +28,11 @@ var DispositivoFireConvert = /** @class */ (function () {
|
|
|
28
28
|
empresa: docData.empresa ? new empresa_1.Empresa(docData.empresa) : null,
|
|
29
29
|
ativo: boolean_helper_1.BooleanHelper.check(docData.ativo, false),
|
|
30
30
|
autenticacao_id: string_helper_1.StringHelper.trim(docData.autenticacao_id, null),
|
|
31
|
-
conta_ref: (_e = docData.conta_ref) !== null &&
|
|
31
|
+
conta_ref: (_f = (_e = docData.conta_ref) === null || _e === void 0 ? void 0 : _e.path) !== null && _f !== void 0 ? _f : null,
|
|
32
32
|
descricao: string_helper_1.StringHelper.trim(docData.descricao, null),
|
|
33
33
|
email: string_helper_1.StringHelper.trim(docData.email, null),
|
|
34
|
-
empresa_ref: (
|
|
35
|
-
perimetros_refs: (
|
|
34
|
+
empresa_ref: (_h = (_g = docData.empresa_ref) === null || _g === void 0 ? void 0 : _g.path) !== null && _h !== void 0 ? _h : null,
|
|
35
|
+
perimetros_refs: (_j = docData.perimetros_refs) !== null && _j !== void 0 ? _j : [],
|
|
36
36
|
endereco: docData.endereco
|
|
37
37
|
? {
|
|
38
38
|
latitude: number_helper_1.NumberHelper.convertToNumber(docData.endereco.latitude),
|
|
@@ -42,16 +42,16 @@ var DispositivoFireConvert = /** @class */ (function () {
|
|
|
42
42
|
excluido: boolean_helper_1.BooleanHelper.check(docData.excluido, false),
|
|
43
43
|
parametros: docData.parametros
|
|
44
44
|
? {
|
|
45
|
-
marcacao_por_cracha: (
|
|
46
|
-
marcacao_por_cracha_sem_toque: (
|
|
47
|
-
modo_espera_minutos: (
|
|
48
|
-
permitir_consultar_ultima_marcacao: (
|
|
49
|
-
utilizar_endereco_gps: (
|
|
50
|
-
ocultar_digitacao_pin: (
|
|
45
|
+
marcacao_por_cracha: (_k = docData.parametros.marcacao_por_cracha) !== null && _k !== void 0 ? _k : false,
|
|
46
|
+
marcacao_por_cracha_sem_toque: (_l = docData.parametros.marcacao_por_cracha_sem_toque) !== null && _l !== void 0 ? _l : false,
|
|
47
|
+
modo_espera_minutos: (_m = number_helper_1.NumberHelper.convertToNumber(docData.parametros.modo_espera_minutos)) !== null && _m !== void 0 ? _m : 30,
|
|
48
|
+
permitir_consultar_ultima_marcacao: (_o = docData.parametros.permitir_consultar_ultima_marcacao) !== null && _o !== void 0 ? _o : true,
|
|
49
|
+
utilizar_endereco_gps: (_p = docData.parametros.utilizar_endereco_gps) !== null && _p !== void 0 ? _p : false,
|
|
50
|
+
ocultar_digitacao_pin: (_q = docData.parametros.ocultar_digitacao_pin) !== null && _q !== void 0 ? _q : false,
|
|
51
51
|
}
|
|
52
52
|
: null,
|
|
53
53
|
pin: string_helper_1.StringHelper.trim(docData.pin, null),
|
|
54
|
-
tipo: (
|
|
54
|
+
tipo: (_r = docData.tipo) !== null && _r !== void 0 ? _r : null,
|
|
55
55
|
token_notificacao: docData.token_notificacao
|
|
56
56
|
? {
|
|
57
57
|
android: string_helper_1.StringHelper.trim(docData.token_notificacao.android, null),
|
|
@@ -65,10 +65,14 @@ var DispositivoFireConvert = /** @class */ (function () {
|
|
|
65
65
|
data_criacao_doc: flitModelsDependencyInjection_1.FlitModelsDependencyInjection.TimestampFromDate(dispositivo.data_criacao_doc),
|
|
66
66
|
ativo: boolean_helper_1.BooleanHelper.check(dispositivo.ativo, false),
|
|
67
67
|
autenticacao_id: string_helper_1.StringHelper.trim(dispositivo.autenticacao_id, null),
|
|
68
|
-
conta_ref: dispositivo.conta_ref
|
|
68
|
+
conta_ref: dispositivo.conta_ref
|
|
69
|
+
? flitModelsDependencyInjection_1.FlitModelsDependencyInjection.DocumentReferenceFromPath(dispositivo.conta_ref)
|
|
70
|
+
: null,
|
|
69
71
|
descricao: string_helper_1.StringHelper.trim(dispositivo.descricao, null),
|
|
70
72
|
email: string_helper_1.StringHelper.trim(dispositivo.email, null),
|
|
71
|
-
empresa_ref:
|
|
73
|
+
empresa_ref: dispositivo.empresa_ref
|
|
74
|
+
? flitModelsDependencyInjection_1.FlitModelsDependencyInjection.DocumentReferenceFromPath(dispositivo.empresa_ref)
|
|
75
|
+
: null,
|
|
72
76
|
perimetros_refs: dispositivo.perimetros_refs,
|
|
73
77
|
endereco: dispositivo.endereco
|
|
74
78
|
? {
|