flit-models 3.3.43 → 3.3.44
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/usuario/usuario-elastic-convert.js +1 -1
- package/lib/models/contas/usuario/usuario-fire-convert.d.ts +9 -9
- package/lib/models/contas/usuario/usuario-fire-convert.js +16 -14
- package/lib/models/contas/usuario/usuario-json-convert.d.ts +11 -11
- package/lib/models/contas/usuario/usuario-json-convert.js +39 -42
- package/package.json +1 -1
|
@@ -112,7 +112,7 @@ var UsuarioElasticConvert = /** @class */ (function () {
|
|
|
112
112
|
pin: number_helper_1.NumberHelper.convertToNumber(docData === null || docData === void 0 ? void 0 : docData.pin),
|
|
113
113
|
pis: string_helper_1.StringHelper.trim(docData.pis, null),
|
|
114
114
|
sem_autenticacao: boolean_helper_1.BooleanHelper.check(docData.sem_autenticacao, false),
|
|
115
|
-
status: string_helper_1.StringHelper.check(docData.status,
|
|
115
|
+
status: string_helper_1.StringHelper.check(docData.status, _1.StatusUsuario.Ativo),
|
|
116
116
|
status_data_ini: date_helper_1.DateHelper.fromString(docData.status_data_ini, null),
|
|
117
117
|
status_data_fim: date_helper_1.DateHelper.fromString(docData.status_data_fim, null),
|
|
118
118
|
status_programado: docData.status_programado
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { BeneficiosUsuario, Integracao, ParametrosUsuario, StatusUsuario, Usuario, UsuarioBase, UsuarioStatusProgramado } from '.';
|
|
2
|
-
import { FirebaseDocumentSnapshotGeneric, FirebaseQueryDocumentSnapshotGeneric, FirebaseTimestampGeneric } from '../../../shared/flitModelsDependencyInjection';
|
|
2
|
+
import { FirebaseDocumentReferenceGeneric, FirebaseDocumentSnapshotGeneric, FirebaseQueryDocumentSnapshotGeneric, FirebaseTimestampGeneric } from '../../../shared/flitModelsDependencyInjection';
|
|
3
3
|
import { AuditoriaModificadorFirestoreData } from '../auditoria/modificador';
|
|
4
4
|
import { Endereco } from '../shared';
|
|
5
5
|
export declare class UsuarioFirestoreData implements Omit<UsuarioBase, 'modificador'> {
|
|
6
|
+
conta_ref?: FirebaseDocumentReferenceGeneric;
|
|
7
|
+
empresa_ref?: FirebaseDocumentReferenceGeneric;
|
|
8
|
+
departamento_ref?: FirebaseDocumentReferenceGeneric;
|
|
9
|
+
cargo_ref?: FirebaseDocumentReferenceGeneric;
|
|
10
|
+
escala_ref?: FirebaseDocumentReferenceGeneric;
|
|
11
|
+
esocial_categoria_de_trabalhador_ref?: FirebaseDocumentReferenceGeneric;
|
|
12
|
+
perfil_ref?: FirebaseDocumentReferenceGeneric;
|
|
13
|
+
perimetros_refs?: FirebaseDocumentReferenceGeneric[];
|
|
6
14
|
admissao?: FirebaseTimestampGeneric;
|
|
7
15
|
ativo?: boolean;
|
|
8
16
|
avatar_atualizacao?: FirebaseTimestampGeneric;
|
|
@@ -10,21 +18,15 @@ export declare class UsuarioFirestoreData implements Omit<UsuarioBase, 'modifica
|
|
|
10
18
|
avatar_thumbnail_url?: string;
|
|
11
19
|
avatarUrl?: string;
|
|
12
20
|
beneficios?: BeneficiosUsuario;
|
|
13
|
-
cargo_ref?: any;
|
|
14
21
|
celular?: string;
|
|
15
|
-
conta_ref?: any;
|
|
16
22
|
cpf?: string;
|
|
17
23
|
data_atualizacao_doc?: FirebaseTimestampGeneric;
|
|
18
24
|
data_criacao_doc?: FirebaseTimestampGeneric;
|
|
19
|
-
departamento_ref?: any;
|
|
20
25
|
desligamento?: FirebaseTimestampGeneric;
|
|
21
26
|
email?: string;
|
|
22
|
-
empresa_ref?: any;
|
|
23
27
|
endereco?: Endereco;
|
|
24
28
|
endereco_prestacao_diferente_empresa?: boolean;
|
|
25
29
|
endereco_prestacao?: Endereco;
|
|
26
|
-
escala_ref?: any;
|
|
27
|
-
esocial_categoria_de_trabalhador_ref?: any;
|
|
28
30
|
excluido?: boolean;
|
|
29
31
|
id_externo?: string;
|
|
30
32
|
integracao?: Integracao;
|
|
@@ -34,8 +36,6 @@ export declare class UsuarioFirestoreData implements Omit<UsuarioBase, 'modifica
|
|
|
34
36
|
nomeCompleto?: string;
|
|
35
37
|
observacoes?: string;
|
|
36
38
|
parametros?: ParametrosUsuario;
|
|
37
|
-
perfil_ref?: any;
|
|
38
|
-
perimetros_refs?: any[];
|
|
39
39
|
pin?: number;
|
|
40
40
|
pis?: string;
|
|
41
41
|
sem_autenticacao?: boolean;
|
|
@@ -16,7 +16,7 @@ var UsuarioFireConvert = /** @class */ (function () {
|
|
|
16
16
|
function UsuarioFireConvert() {
|
|
17
17
|
}
|
|
18
18
|
UsuarioFireConvert.fromFirestore = function (doc) {
|
|
19
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27
|
|
19
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27;
|
|
20
20
|
var d = ((_a = doc.data()) !== null && _a !== void 0 ? _a : {});
|
|
21
21
|
return new _1.Usuario({
|
|
22
22
|
_id: (_b = doc === null || doc === void 0 ? void 0 : doc.id) !== null && _b !== void 0 ? _b : null,
|
|
@@ -113,29 +113,31 @@ var UsuarioFireConvert = /** @class */ (function () {
|
|
|
113
113
|
}
|
|
114
114
|
: null,
|
|
115
115
|
perfil_ref: d.perfil_ref ? (_8 = d.perfil_ref) === null || _8 === void 0 ? void 0 : _8.path : null,
|
|
116
|
-
perimetros_refs:
|
|
116
|
+
perimetros_refs: d.perimetros_refs
|
|
117
|
+
? d.perimetros_refs.map(function (ref) { return ref === null || ref === void 0 ? void 0 : ref.path; })
|
|
118
|
+
: null,
|
|
117
119
|
pin: number_helper_1.NumberHelper.convertToNumber(d === null || d === void 0 ? void 0 : d.pin),
|
|
118
120
|
pis: string_helper_1.StringHelper.trim(d.pis, null),
|
|
119
121
|
sem_autenticacao: boolean_helper_1.BooleanHelper.check(d.sem_autenticacao, false),
|
|
120
|
-
status: string_helper_1.StringHelper.check(d.status,
|
|
121
|
-
status_data_ini: (
|
|
122
|
-
status_data_fim: (
|
|
122
|
+
status: string_helper_1.StringHelper.check(d.status, _1.StatusUsuario.Ativo),
|
|
123
|
+
status_data_ini: (_10 = (_9 = d.status_data_ini) === null || _9 === void 0 ? void 0 : _9.toDate()) !== null && _10 !== void 0 ? _10 : null,
|
|
124
|
+
status_data_fim: (_12 = (_11 = d.status_data_fim) === null || _11 === void 0 ? void 0 : _11.toDate()) !== null && _12 !== void 0 ? _12 : null,
|
|
123
125
|
status_programado: d.status_programado
|
|
124
126
|
? {
|
|
125
|
-
data_prevista: (
|
|
126
|
-
executado: boolean_helper_1.BooleanHelper.check((
|
|
127
|
-
tipo: string_helper_1.StringHelper.check((
|
|
127
|
+
data_prevista: (_14 = (_13 = d.status_programado.data_prevista) === null || _13 === void 0 ? void 0 : _13.toDate()) !== null && _14 !== void 0 ? _14 : null,
|
|
128
|
+
executado: boolean_helper_1.BooleanHelper.check((_15 = d.status_programado) === null || _15 === void 0 ? void 0 : _15.executado, null),
|
|
129
|
+
tipo: string_helper_1.StringHelper.check((_16 = d.status_programado) === null || _16 === void 0 ? void 0 : _16.tipo, null),
|
|
128
130
|
}
|
|
129
131
|
: null,
|
|
130
132
|
telefone: string_helper_1.StringHelper.trim(d.telefone, null),
|
|
131
133
|
modificador: d.modificador
|
|
132
134
|
? (0, lodash_1.omitBy)({
|
|
133
|
-
id: (
|
|
134
|
-
ref: (
|
|
135
|
-
tipo: (
|
|
136
|
-
nome: string_helper_1.StringHelper.trim((
|
|
137
|
-
documento: string_helper_1.StringHelper.trim((
|
|
138
|
-
email: string_helper_1.StringHelper.trim((
|
|
135
|
+
id: (_19 = (_18 = (_17 = d.modificador) === null || _17 === void 0 ? void 0 : _17.ref) === null || _18 === void 0 ? void 0 : _18.id) !== null && _19 !== void 0 ? _19 : null,
|
|
136
|
+
ref: (_22 = (_21 = (_20 = d.modificador) === null || _20 === void 0 ? void 0 : _20.ref) === null || _21 === void 0 ? void 0 : _21.path) !== null && _22 !== void 0 ? _22 : null,
|
|
137
|
+
tipo: (_24 = (_23 = d.modificador) === null || _23 === void 0 ? void 0 : _23.tipo) !== null && _24 !== void 0 ? _24 : null,
|
|
138
|
+
nome: string_helper_1.StringHelper.trim((_25 = d.modificador) === null || _25 === void 0 ? void 0 : _25.nome, null),
|
|
139
|
+
documento: string_helper_1.StringHelper.trim((_26 = d.modificador) === null || _26 === void 0 ? void 0 : _26.documento, null),
|
|
140
|
+
email: string_helper_1.StringHelper.trim((_27 = d.modificador) === null || _27 === void 0 ? void 0 : _27.email, null),
|
|
139
141
|
}, lodash_1.isUndefined)
|
|
140
142
|
: undefined,
|
|
141
143
|
});
|
|
@@ -4,28 +4,30 @@ import { Endereco } from '../shared';
|
|
|
4
4
|
export declare class UsuarioJsonData implements UsuarioBase {
|
|
5
5
|
_id: string;
|
|
6
6
|
_path: string;
|
|
7
|
+
conta_ref?: string;
|
|
8
|
+
empresa_ref?: string;
|
|
9
|
+
departamento_ref?: string;
|
|
10
|
+
cargo_ref?: string;
|
|
11
|
+
escala_ref?: string;
|
|
12
|
+
esocial_categoria_de_trabalhador_ref?: string;
|
|
13
|
+
perfil_ref?: string;
|
|
14
|
+
perimetros_refs?: string[];
|
|
7
15
|
admissao?: number;
|
|
8
16
|
ativo?: boolean;
|
|
9
|
-
avatar_atualizacao?:
|
|
17
|
+
avatar_atualizacao?: number;
|
|
10
18
|
avatar_thumbnail_path?: string;
|
|
11
19
|
avatar_thumbnail_url?: string;
|
|
12
20
|
avatarUrl?: string;
|
|
13
21
|
beneficios?: BeneficiosUsuario;
|
|
14
|
-
cargo_ref?: any;
|
|
15
22
|
celular?: string;
|
|
16
|
-
conta_ref?: any;
|
|
17
23
|
cpf?: string;
|
|
18
|
-
data_atualizacao_doc?:
|
|
19
|
-
data_criacao_doc?:
|
|
20
|
-
departamento_ref?: any;
|
|
24
|
+
data_atualizacao_doc?: number;
|
|
25
|
+
data_criacao_doc?: number;
|
|
21
26
|
desligamento?: number;
|
|
22
27
|
email?: string;
|
|
23
|
-
empresa_ref?: any;
|
|
24
28
|
endereco?: Endereco;
|
|
25
29
|
endereco_prestacao_diferente_empresa?: boolean;
|
|
26
30
|
endereco_prestacao?: Endereco;
|
|
27
|
-
escala_ref?: any;
|
|
28
|
-
esocial_categoria_de_trabalhador_ref?: any;
|
|
29
31
|
excluido?: boolean;
|
|
30
32
|
id_externo?: string;
|
|
31
33
|
integracao?: Integracao;
|
|
@@ -35,8 +37,6 @@ export declare class UsuarioJsonData implements UsuarioBase {
|
|
|
35
37
|
nomeCompleto?: string;
|
|
36
38
|
observacoes?: string;
|
|
37
39
|
parametros?: ParametrosUsuario;
|
|
38
|
-
perfil_ref?: any;
|
|
39
|
-
perimetros_refs?: any[];
|
|
40
40
|
pin?: number;
|
|
41
41
|
pis?: string;
|
|
42
42
|
sem_autenticacao?: boolean;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UsuarioJsonConvert = exports.UsuarioJsonData = void 0;
|
|
4
4
|
var lodash_1 = require("lodash");
|
|
5
|
+
var _1 = require(".");
|
|
5
6
|
var boolean_helper_1 = require("../../utils/boolean-helper");
|
|
6
7
|
var date_helper_1 = require("../../utils/date-helper");
|
|
7
8
|
var number_helper_1 = require("../../utils/number-helper");
|
|
@@ -19,39 +20,33 @@ var UsuarioJsonConvert = /** @class */ (function () {
|
|
|
19
20
|
// public static fromJson(obj: UsuarioJsonData): Usuario {
|
|
20
21
|
// }
|
|
21
22
|
UsuarioJsonConvert.toJson = function (usuario) {
|
|
22
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0,
|
|
23
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24;
|
|
23
24
|
var usuarioJson = {
|
|
24
25
|
_id: (_a = usuario === null || usuario === void 0 ? void 0 : usuario._id) !== null && _a !== void 0 ? _a : null,
|
|
25
26
|
_path: (_b = usuario === null || usuario === void 0 ? void 0 : usuario._path) !== null && _b !== void 0 ? _b : null,
|
|
26
27
|
admissao: (_c = date_helper_1.DateHelper.fromString(usuario.admissao, null)) === null || _c === void 0 ? void 0 : _c.getTime(),
|
|
27
28
|
ativo: boolean_helper_1.BooleanHelper.check(usuario.ativo, null),
|
|
28
|
-
avatar_atualizacao: usuario.avatar_atualizacao
|
|
29
|
-
? usuario.avatar_atualizacao.toISOString()
|
|
30
|
-
: null,
|
|
29
|
+
avatar_atualizacao: (_d = date_helper_1.DateHelper.fromString(usuario.avatar_atualizacao, null)) === null || _d === void 0 ? void 0 : _d.getTime(),
|
|
31
30
|
avatar_thumbnail_path: string_helper_1.StringHelper.check(usuario.avatar_thumbnail_path, null),
|
|
32
31
|
avatar_thumbnail_url: string_helper_1.StringHelper.check(usuario.avatar_thumbnail_url, null),
|
|
33
32
|
avatarUrl: string_helper_1.StringHelper.check(usuario.avatarUrl, null),
|
|
34
33
|
beneficios: usuario.beneficios
|
|
35
34
|
? {
|
|
36
|
-
vale_alimentacao: (
|
|
37
|
-
vale_refeicao: (
|
|
38
|
-
vale_transporte: (
|
|
35
|
+
vale_alimentacao: (_e = usuario.beneficios.vale_alimentacao) !== null && _e !== void 0 ? _e : false,
|
|
36
|
+
vale_refeicao: (_f = usuario.beneficios.vale_refeicao) !== null && _f !== void 0 ? _f : false,
|
|
37
|
+
vale_transporte: (_g = usuario.beneficios.vale_transporte) !== null && _g !== void 0 ? _g : false,
|
|
39
38
|
}
|
|
40
39
|
: null,
|
|
41
|
-
cargo_ref: (
|
|
40
|
+
cargo_ref: (_j = (_h = usuario.cargo_ref) === null || _h === void 0 ? void 0 : _h.path) !== null && _j !== void 0 ? _j : null,
|
|
42
41
|
celular: string_helper_1.StringHelper.trim(usuario.celular, null),
|
|
43
|
-
conta_ref: (
|
|
42
|
+
conta_ref: (_l = (_k = usuario.conta_ref) === null || _k === void 0 ? void 0 : _k.path) !== null && _l !== void 0 ? _l : null,
|
|
44
43
|
cpf: string_helper_1.StringHelper.trim(usuario.cpf, null),
|
|
45
|
-
data_atualizacao_doc: usuario.data_atualizacao_doc
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
? usuario.data_atualizacao_doc.toISOString()
|
|
50
|
-
: null,
|
|
51
|
-
departamento_ref: (_j = usuario.departamento_ref) !== null && _j !== void 0 ? _j : null,
|
|
52
|
-
desligamento: (_k = date_helper_1.DateHelper.fromString(usuario.desligamento, null)) === null || _k === void 0 ? void 0 : _k.getTime(),
|
|
44
|
+
data_atualizacao_doc: (_m = date_helper_1.DateHelper.fromString(usuario.data_atualizacao_doc, null)) === null || _m === void 0 ? void 0 : _m.getTime(),
|
|
45
|
+
data_criacao_doc: (_o = date_helper_1.DateHelper.fromString(usuario.data_criacao_doc, null)) === null || _o === void 0 ? void 0 : _o.getTime(),
|
|
46
|
+
departamento_ref: (_q = (_p = usuario.departamento_ref) === null || _p === void 0 ? void 0 : _p.path) !== null && _q !== void 0 ? _q : null,
|
|
47
|
+
desligamento: (_r = date_helper_1.DateHelper.fromString(usuario.desligamento, null)) === null || _r === void 0 ? void 0 : _r.getTime(),
|
|
53
48
|
email: string_helper_1.StringHelper.trim(usuario.email, null),
|
|
54
|
-
empresa_ref: (
|
|
49
|
+
empresa_ref: (_t = (_s = usuario.empresa_ref) === null || _s === void 0 ? void 0 : _s.path) !== null && _t !== void 0 ? _t : null,
|
|
55
50
|
endereco: usuario.endereco
|
|
56
51
|
? {
|
|
57
52
|
bairro: string_helper_1.StringHelper.trim(usuario.endereco.bairro, null),
|
|
@@ -75,18 +70,18 @@ var UsuarioJsonConvert = /** @class */ (function () {
|
|
|
75
70
|
uf: string_helper_1.StringHelper.trim(usuario.endereco_prestacao.uf, null),
|
|
76
71
|
}
|
|
77
72
|
: null,
|
|
78
|
-
escala_ref: (
|
|
79
|
-
esocial_categoria_de_trabalhador_ref: (
|
|
73
|
+
escala_ref: (_v = (_u = usuario.escala_ref) === null || _u === void 0 ? void 0 : _u.path) !== null && _v !== void 0 ? _v : null,
|
|
74
|
+
esocial_categoria_de_trabalhador_ref: (_x = (_w = usuario.esocial_categoria_de_trabalhador_ref) === null || _w === void 0 ? void 0 : _w.path) !== null && _x !== void 0 ? _x : null,
|
|
80
75
|
excluido: boolean_helper_1.BooleanHelper.check(usuario.excluido, false),
|
|
81
76
|
id_externo: string_helper_1.StringHelper.trim(usuario.id_externo, null),
|
|
82
77
|
integracao: usuario.integracao
|
|
83
78
|
? {
|
|
84
|
-
id: string_helper_1.StringHelper.trim((
|
|
85
|
-
tipo: string_helper_1.StringHelper.trim((
|
|
79
|
+
id: string_helper_1.StringHelper.trim((_y = usuario.integracao) === null || _y === void 0 ? void 0 : _y.id, null),
|
|
80
|
+
tipo: string_helper_1.StringHelper.trim((_z = usuario.integracao) === null || _z === void 0 ? void 0 : _z.tipo, null),
|
|
86
81
|
}
|
|
87
82
|
: null,
|
|
88
83
|
interno: boolean_helper_1.BooleanHelper.check(usuario.interno, false),
|
|
89
|
-
nascimento: (
|
|
84
|
+
nascimento: (_0 = date_helper_1.DateHelper.fromString(usuario.nascimento, null)) === null || _0 === void 0 ? void 0 : _0.getTime(),
|
|
90
85
|
nome: string_helper_1.StringHelper.trim(usuario.nome, null),
|
|
91
86
|
nomeCompleto: string_helper_1.StringHelper.trim(usuario.nomeCompleto, null),
|
|
92
87
|
observacoes: string_helper_1.StringHelper.trim(usuario.observacoes, null),
|
|
@@ -97,12 +92,12 @@ var UsuarioJsonConvert = /** @class */ (function () {
|
|
|
97
92
|
capturar_localizacao_marcacao_externa: boolean_helper_1.BooleanHelper.check(usuario.parametros.capturar_localizacao_marcacao_externa, null),
|
|
98
93
|
cargo_confianca: boolean_helper_1.BooleanHelper.check(usuario.parametros.cargo_confianca, null),
|
|
99
94
|
codigo_externo: string_helper_1.StringHelper.check(usuario.parametros.codigo_externo, null),
|
|
100
|
-
horario_noturno: ((
|
|
95
|
+
horario_noturno: ((_2 = usuario.parametros) === null || _2 === void 0 ? void 0 : _2.horario_noturno)
|
|
101
96
|
? {
|
|
102
|
-
tipo: string_helper_1.StringHelper.check((
|
|
103
|
-
inicio: string_helper_1.StringHelper.check((
|
|
104
|
-
fim: string_helper_1.StringHelper.check((
|
|
105
|
-
hora_reduzida_segundos: number_helper_1.NumberHelper.convertToNumber((
|
|
97
|
+
tipo: string_helper_1.StringHelper.check((_3 = usuario.parametros.horario_noturno) === null || _3 === void 0 ? void 0 : _3.tipo, null),
|
|
98
|
+
inicio: string_helper_1.StringHelper.check((_4 = usuario.parametros.horario_noturno) === null || _4 === void 0 ? void 0 : _4.inicio, null),
|
|
99
|
+
fim: string_helper_1.StringHelper.check((_5 = usuario.parametros.horario_noturno) === null || _5 === void 0 ? void 0 : _5.fim, null),
|
|
100
|
+
hora_reduzida_segundos: number_helper_1.NumberHelper.convertToNumber((_6 = usuario.parametros.horario_noturno) === null || _6 === void 0 ? void 0 : _6.hora_reduzida_segundos),
|
|
106
101
|
}
|
|
107
102
|
: null,
|
|
108
103
|
horista: boolean_helper_1.BooleanHelper.check(usuario.parametros.horista, null),
|
|
@@ -114,34 +109,36 @@ var UsuarioJsonConvert = /** @class */ (function () {
|
|
|
114
109
|
reconhecimento_facial_obrigatorio: boolean_helper_1.BooleanHelper.check(usuario.parametros.reconhecimento_facial_obrigatorio, null),
|
|
115
110
|
marca_ponto_apenas_online: boolean_helper_1.BooleanHelper.check(usuario.parametros.marca_ponto_apenas_online, null),
|
|
116
111
|
configuracao_tipo_falta_jornada: string_helper_1.StringHelper.check(usuario.parametros.configuracao_tipo_falta_jornada, null),
|
|
117
|
-
limite_minutos_interjornada: number_helper_1.NumberHelper.convertToNumber((
|
|
112
|
+
limite_minutos_interjornada: number_helper_1.NumberHelper.convertToNumber((_7 = usuario.parametros) === null || _7 === void 0 ? void 0 : _7.limite_minutos_interjornada),
|
|
118
113
|
regime_compensacao: string_helper_1.StringHelper.check(usuario.parametros.regime_compensacao, null),
|
|
119
114
|
}
|
|
120
115
|
: null,
|
|
121
|
-
perfil_ref: (
|
|
122
|
-
perimetros_refs:
|
|
116
|
+
perfil_ref: (_9 = (_8 = usuario.perfil_ref) === null || _8 === void 0 ? void 0 : _8.path) !== null && _9 !== void 0 ? _9 : null,
|
|
117
|
+
perimetros_refs: usuario.perimetros_refs
|
|
118
|
+
? usuario.perimetros_refs.map(function (ref) { return ref === null || ref === void 0 ? void 0 : ref.path; })
|
|
119
|
+
: null,
|
|
123
120
|
pin: number_helper_1.NumberHelper.convertToNumber(usuario === null || usuario === void 0 ? void 0 : usuario.pin),
|
|
124
121
|
pis: string_helper_1.StringHelper.trim(usuario.pis, null),
|
|
125
122
|
sem_autenticacao: boolean_helper_1.BooleanHelper.check(usuario.sem_autenticacao, null),
|
|
126
|
-
status: string_helper_1.StringHelper.check(usuario.status,
|
|
127
|
-
status_data_ini: (
|
|
128
|
-
status_data_fim: (
|
|
123
|
+
status: string_helper_1.StringHelper.check(usuario.status, _1.StatusUsuario.Ativo),
|
|
124
|
+
status_data_ini: (_10 = date_helper_1.DateHelper.fromString(usuario.status_data_ini, null)) === null || _10 === void 0 ? void 0 : _10.getTime(),
|
|
125
|
+
status_data_fim: (_11 = date_helper_1.DateHelper.fromString(usuario.status_data_fim, null)) === null || _11 === void 0 ? void 0 : _11.getTime(),
|
|
129
126
|
status_programado: usuario.status_programado
|
|
130
127
|
? {
|
|
131
|
-
data_prevista: (
|
|
128
|
+
data_prevista: (_12 = date_helper_1.DateHelper.fromString(usuario.status_programado.data_prevista, null)) === null || _12 === void 0 ? void 0 : _12.getTime(),
|
|
132
129
|
executado: boolean_helper_1.BooleanHelper.check(usuario.status_programado.executado, null),
|
|
133
|
-
tipo: string_helper_1.StringHelper.check((
|
|
130
|
+
tipo: string_helper_1.StringHelper.check((_13 = usuario.status_programado) === null || _13 === void 0 ? void 0 : _13.tipo, null),
|
|
134
131
|
}
|
|
135
132
|
: null,
|
|
136
133
|
telefone: string_helper_1.StringHelper.trim(usuario.telefone, null),
|
|
137
134
|
modificador: usuario.modificador
|
|
138
135
|
? (0, lodash_1.omitBy)({
|
|
139
|
-
id: (
|
|
140
|
-
ref: (
|
|
141
|
-
tipo: (
|
|
142
|
-
nome: string_helper_1.StringHelper.trim((
|
|
143
|
-
documento: string_helper_1.StringHelper.trim((
|
|
144
|
-
email: string_helper_1.StringHelper.trim((
|
|
136
|
+
id: (_16 = (_15 = (_14 = usuario.modificador) === null || _14 === void 0 ? void 0 : _14.ref) === null || _15 === void 0 ? void 0 : _15.id) !== null && _16 !== void 0 ? _16 : null,
|
|
137
|
+
ref: (_19 = (_18 = (_17 = usuario.modificador) === null || _17 === void 0 ? void 0 : _17.ref) === null || _18 === void 0 ? void 0 : _18.path) !== null && _19 !== void 0 ? _19 : null,
|
|
138
|
+
tipo: (_21 = (_20 = usuario.modificador) === null || _20 === void 0 ? void 0 : _20.tipo) !== null && _21 !== void 0 ? _21 : null,
|
|
139
|
+
nome: string_helper_1.StringHelper.trim((_22 = usuario.modificador) === null || _22 === void 0 ? void 0 : _22.nome, null),
|
|
140
|
+
documento: string_helper_1.StringHelper.trim((_23 = usuario.modificador) === null || _23 === void 0 ? void 0 : _23.documento, null),
|
|
141
|
+
email: string_helper_1.StringHelper.trim((_24 = usuario.modificador) === null || _24 === void 0 ? void 0 : _24.email, null),
|
|
145
142
|
}, lodash_1.isUndefined)
|
|
146
143
|
: undefined,
|
|
147
144
|
};
|