@senior-gestao-pessoas/hcm-contract-employee-history 5.5.2 → 5.6.1
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/bundles/senior-gestao-pessoas-hcm-contract-employee-history.umd.js +651 -251
- package/bundles/senior-gestao-pessoas-hcm-contract-employee-history.umd.js.map +1 -1
- package/bundles/senior-gestao-pessoas-hcm-contract-employee-history.umd.min.js +2 -2
- package/bundles/senior-gestao-pessoas-hcm-contract-employee-history.umd.min.js.map +1 -1
- package/core/dtos/employee-dependent-save-dto.d.ts +2 -1
- package/core/entities/dependent-draft/dependent-draft.d.ts +11 -0
- package/core/entities/dependent-draft/dependent-draft.dto.d.ts +13 -0
- package/core/entities/dependent-draft/dependent-draft.service.d.ts +13 -0
- package/esm2015/core/dtos/employee-dependent-save-dto.js +1 -1
- package/esm2015/core/entities/dependent-draft/dependent-draft.dto.js +1 -0
- package/esm2015/core/entities/dependent-draft/dependent-draft.js +56 -0
- package/esm2015/core/entities/dependent-draft/dependent-draft.service.js +26 -0
- package/esm2015/lib/employee-dependent/employee-dependent.module.js +14 -2
- package/esm2015/lib/employee-dependent/form/employee-dependent-form.component.js +179 -75
- package/esm2015/lib/employee-dependent/form/employee-dependent-personal-step/employee-dependent-personal-step.component.js +1 -1
- package/esm2015/lib/employee-dependent/list/draft/dependent-list-draft.component.js +216 -0
- package/esm2015/lib/employee-dependent/list/employee-dependent-list.component.js +13 -2
- package/esm2015/lib/utils/helpers.js +24 -1
- package/esm2015/public-api.js +1 -2
- package/esm2015/senior-gestao-pessoas-hcm-contract-employee-history.js +10 -8
- package/esm5/core/dtos/employee-dependent-save-dto.js +1 -1
- package/esm5/core/entities/dependent-draft/dependent-draft.dto.js +1 -0
- package/esm5/core/entities/dependent-draft/dependent-draft.js +61 -0
- package/esm5/core/entities/dependent-draft/dependent-draft.service.js +29 -0
- package/esm5/lib/employee-dependent/employee-dependent.module.js +14 -2
- package/esm5/lib/employee-dependent/form/employee-dependent-form.component.js +183 -75
- package/esm5/lib/employee-dependent/form/employee-dependent-personal-step/employee-dependent-personal-step.component.js +1 -1
- package/esm5/lib/employee-dependent/list/draft/dependent-list-draft.component.js +230 -0
- package/esm5/lib/employee-dependent/list/employee-dependent-list.component.js +17 -2
- package/esm5/lib/utils/helpers.js +24 -1
- package/esm5/public-api.js +1 -2
- package/esm5/senior-gestao-pessoas-hcm-contract-employee-history.js +10 -8
- package/fesm2015/senior-gestao-pessoas-hcm-contract-employee-history.js +612 -244
- package/fesm2015/senior-gestao-pessoas-hcm-contract-employee-history.js.map +1 -1
- package/fesm5/senior-gestao-pessoas-hcm-contract-employee-history.js +641 -244
- package/fesm5/senior-gestao-pessoas-hcm-contract-employee-history.js.map +1 -1
- package/lib/employee-dependent/form/employee-dependent-form.component.d.ts +16 -7
- package/lib/employee-dependent/list/draft/dependent-list-draft.component.d.ts +49 -0
- package/lib/employee-dependent/list/employee-dependent-list.component.d.ts +3 -0
- package/lib/utils/helpers.d.ts +11 -1
- package/package.json +1 -1
- package/public-api.d.ts +0 -1
- package/senior-gestao-pessoas-hcm-contract-employee-history.d.ts +9 -7
- package/senior-gestao-pessoas-hcm-contract-employee-history.metadata.json +1 -1
- package/esm2015/locale/fallback.js +0 -54
- package/esm5/locale/fallback.js +0 -54
- package/locale/fallback.d.ts +0 -1
|
@@ -5,9 +5,9 @@ import { HttpParams, HttpClient } from '@angular/common/http';
|
|
|
5
5
|
import { MessageService, ConfirmationService, SharedModule } from 'primeng/api';
|
|
6
6
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
7
7
|
import { throwError, Subject, forkJoin, of, Observable } from 'rxjs';
|
|
8
|
-
import { catchError, map, takeUntil, finalize, distinct, filter, tap, delay, distinctUntilChanged } from 'rxjs/operators';
|
|
8
|
+
import { catchError, map, takeUntil, finalize, distinct, filter, tap, delay, distinctUntilChanged, debounceTime } from 'rxjs/operators';
|
|
9
9
|
import { FieldType, CustomFieldsModule, ControlErrorsModule, EmptyStateModule, DynamicFormModule, ButtonModule, LoadingStateModule, InfoSignModule, CalendarMaskModule, TokenListModule, TableModule as TableModule$1, LocaleModule, FormField, BignumberInputModule, DynamicType, FileUploadModule, ObjectCardModule, StepState, SidebarModule, StepsModule } from '@seniorsistemas/angular-components';
|
|
10
|
-
import * as moment$
|
|
10
|
+
import * as moment$q from 'moment';
|
|
11
11
|
import { FormGroup, FormArray, Validators, FormsModule, ReactiveFormsModule, FormControl, FormBuilder } from '@angular/forms';
|
|
12
12
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
13
13
|
import 'zone.js/dist/zone-error';
|
|
@@ -43,7 +43,7 @@ import { DialogModule } from 'primeng/dialog';
|
|
|
43
43
|
import { SUrlService } from '@senior-gestao-pessoas/angular-components';
|
|
44
44
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
45
45
|
|
|
46
|
-
const moment = moment$
|
|
46
|
+
const moment = moment$q;
|
|
47
47
|
function isObject(item) {
|
|
48
48
|
return item && typeof item === "object" && !Array.isArray(item);
|
|
49
49
|
}
|
|
@@ -260,6 +260,29 @@ function createFilterString(formField, value, opts) {
|
|
|
260
260
|
return `${name} eq '${value}'`;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
+
/**
|
|
264
|
+
* Atualiza e força validação somente dos campos especificados.
|
|
265
|
+
* @param abstractControl FormGroup ou FormArray raiz.
|
|
266
|
+
* @param fields Lista de caminhos dos campos a validar. Ex.: ['nome', 'endereco.rua', 'itens.0.quantidade']
|
|
267
|
+
*/
|
|
268
|
+
function validateSpecificControls(abstractControl, fields) {
|
|
269
|
+
fields.forEach(path => {
|
|
270
|
+
const control = abstractControl.get(path);
|
|
271
|
+
if (!control) {
|
|
272
|
+
console.warn(`Campo não encontrado: ${path}`);
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
updateSingleControl(control);
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Força validação de um único AbstractControl.
|
|
280
|
+
*/
|
|
281
|
+
function updateSingleControl(control) {
|
|
282
|
+
control.markAsDirty();
|
|
283
|
+
control.markAsTouched();
|
|
284
|
+
control.updateValueAndValidity({ emitEvent: true });
|
|
285
|
+
}
|
|
263
286
|
|
|
264
287
|
var ContractType;
|
|
265
288
|
(function (ContractType) {
|
|
@@ -358,14 +381,14 @@ const createFilterTokens = (formField, value, translate) => {
|
|
|
358
381
|
let labelValue = value;
|
|
359
382
|
switch (type) {
|
|
360
383
|
case FieldType.Date:
|
|
361
|
-
labelValue = moment$
|
|
384
|
+
labelValue = moment$q(value).format("L");
|
|
362
385
|
break;
|
|
363
386
|
case FieldType.Time:
|
|
364
|
-
labelValue = moment$
|
|
387
|
+
labelValue = moment$q(value).format("LTS");
|
|
365
388
|
break;
|
|
366
389
|
case FieldType.LocalDateTime:
|
|
367
390
|
case FieldType.DateTime:
|
|
368
|
-
labelValue = moment$
|
|
391
|
+
labelValue = moment$q(value).format("L LTS");
|
|
369
392
|
break;
|
|
370
393
|
case FieldType.Lookup:
|
|
371
394
|
labelValue = searchFields.map((field) => getProp(value, field.name)).join(" - ");
|
|
@@ -385,7 +408,7 @@ const mergeDateTime = (date1, date2) => {
|
|
|
385
408
|
if (!date1 || !date2) {
|
|
386
409
|
return null;
|
|
387
410
|
}
|
|
388
|
-
return moment$
|
|
411
|
+
return moment$q(moment$q(date1).format("YYYY-MM-DD") + moment$q(date2).set({ second: 0, millisecond: 0 }).format("THH:mm:ssZ"));
|
|
389
412
|
};
|
|
390
413
|
const contractTypeOptions = (translate) => {
|
|
391
414
|
return [
|
|
@@ -413,7 +436,7 @@ const situationOptions = (translate, configService) => {
|
|
|
413
436
|
];
|
|
414
437
|
};
|
|
415
438
|
const getSituationFilterInHistorics = (situation) => {
|
|
416
|
-
const nowDate = moment$
|
|
439
|
+
const nowDate = moment$q().format('YYYY-MM-DD');
|
|
417
440
|
if (situation == SituationEmployee.WORKING) {
|
|
418
441
|
return `(employee.dismissalDate is null or employee.dismissalDate gt '${nowDate}')`;
|
|
419
442
|
}
|
|
@@ -996,7 +1019,7 @@ WorkshiftModule = __decorate([
|
|
|
996
1019
|
/*{CA:FILE_CONTENTS:START}*/
|
|
997
1020
|
/*{CA:FILE_CONTENTS:END}*/
|
|
998
1021
|
|
|
999
|
-
const moment$1 = moment$
|
|
1022
|
+
const moment$1 = moment$q;
|
|
1000
1023
|
let WorkshiftHistoryService = class WorkshiftHistoryService extends EntityService {
|
|
1001
1024
|
constructor(http, messageService, translate) {
|
|
1002
1025
|
super(http, messageService, `hcm_contract/employment_contract/entities/workshiftHistory`, `hcm_contract/employment_contract/actions`, translate);
|
|
@@ -1252,8 +1275,8 @@ let LeaveHistoryService = class LeaveHistoryService extends EntityService {
|
|
|
1252
1275
|
hasV1OrV3LeaveWithinSixtyDays(employeeId, referenceDate) {
|
|
1253
1276
|
return this.http.post(`hcm_contract/employment_additional_info/queries/hasLeaveWithESocialReasonTypeInPeriod`, {
|
|
1254
1277
|
employeeId,
|
|
1255
|
-
periodStartDate: moment$
|
|
1256
|
-
periodEndDate: moment$
|
|
1278
|
+
periodStartDate: moment$q(referenceDate).subtract(60, 'days').format('YYYY-MM-DD'),
|
|
1279
|
+
periodEndDate: moment$q(referenceDate).subtract(1, 'millisecond').format('YYYY-MM-DD'),
|
|
1257
1280
|
eSocialReasonTypes: [ESocialReasonType.V1, ESocialReasonType.V3]
|
|
1258
1281
|
}).pipe(this.defaultCatch(), map(({ result }) => result));
|
|
1259
1282
|
}
|
|
@@ -1284,8 +1307,8 @@ let LeaveHistoryBFFService = class LeaveHistoryBFFService {
|
|
|
1284
1307
|
hasV1OrV3LeaveWithinSixtyDays(employeeId, referenceDate) {
|
|
1285
1308
|
return this.http.post(`${this.QUERIES_URL}/hasLeaveWithESocialReasonTypeInPeriodBFF`, {
|
|
1286
1309
|
employeeId,
|
|
1287
|
-
periodStartDate: moment$
|
|
1288
|
-
periodEndDate: moment$
|
|
1310
|
+
periodStartDate: moment$q(referenceDate).subtract(60, 'days').format('YYYY-MM-DD'),
|
|
1311
|
+
periodEndDate: moment$q(referenceDate).subtract(1, 'millisecond').format('YYYY-MM-DD'),
|
|
1289
1312
|
eSocialReasonTypes: [ESocialReasonType.V1, ESocialReasonType.V3]
|
|
1290
1313
|
}).pipe(this.defaultCatch(), map(({ result }) => result));
|
|
1291
1314
|
}
|
|
@@ -1523,7 +1546,7 @@ let ESocialReasonService = class ESocialReasonService extends EntityService {
|
|
|
1523
1546
|
fetchESocialReasonType(situationId, referenceDate) {
|
|
1524
1547
|
return this.listExternalESocialReason({
|
|
1525
1548
|
displayFields: ['id', 'eSocialReasonType'],
|
|
1526
|
-
filterQuery: `situation.id eq '${situationId}' and competence le '${moment$
|
|
1549
|
+
filterQuery: `situation.id eq '${situationId}' and competence le '${moment$q(referenceDate).format("YYYY-MM-DD")}'`,
|
|
1527
1550
|
page: 0,
|
|
1528
1551
|
size: 1,
|
|
1529
1552
|
sort: [{ field: 'competence', order: -1 }]
|
|
@@ -2218,7 +2241,7 @@ CoreHistoryModule = __decorate([
|
|
|
2218
2241
|
})
|
|
2219
2242
|
], CoreHistoryModule);
|
|
2220
2243
|
|
|
2221
|
-
const moment$2 = moment$
|
|
2244
|
+
const moment$2 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2222
2245
|
class E001Pes {
|
|
2223
2246
|
constructor() {
|
|
2224
2247
|
this.excluido = false;
|
|
@@ -2242,7 +2265,7 @@ class E001Pes {
|
|
|
2242
2265
|
}
|
|
2243
2266
|
}
|
|
2244
2267
|
|
|
2245
|
-
const moment$3 = moment$
|
|
2268
|
+
const moment$3 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2246
2269
|
class Employee {
|
|
2247
2270
|
constructor() {
|
|
2248
2271
|
this.deleted = false;
|
|
@@ -2293,7 +2316,7 @@ class Employee {
|
|
|
2293
2316
|
}
|
|
2294
2317
|
|
|
2295
2318
|
/*{CA:PACKAGE_IMPORTS:START}*/
|
|
2296
|
-
const moment$4 = moment$
|
|
2319
|
+
const moment$4 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2297
2320
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
2298
2321
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
2299
2322
|
class Workshift {
|
|
@@ -2338,7 +2361,7 @@ class Workshift {
|
|
|
2338
2361
|
/*{CA:FILE_CONTENTS:END}*/
|
|
2339
2362
|
|
|
2340
2363
|
/*{CA:PACKAGE_IMPORTS:START}*/
|
|
2341
|
-
const moment$5 = moment$
|
|
2364
|
+
const moment$5 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2342
2365
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
2343
2366
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
2344
2367
|
class WorkshiftGroup {
|
|
@@ -2384,7 +2407,7 @@ class WorkshiftGroup {
|
|
|
2384
2407
|
/*{CA:FILE_CONTENTS:END}*/
|
|
2385
2408
|
|
|
2386
2409
|
/*{CA:PACKAGE_IMPORTS:START}*/
|
|
2387
|
-
const moment$6 = moment$
|
|
2410
|
+
const moment$6 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2388
2411
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
2389
2412
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
2390
2413
|
class WorkshiftHistory {
|
|
@@ -2463,7 +2486,7 @@ class WorkshiftHistory {
|
|
|
2463
2486
|
/*{CA:FILE_CONTENTS:END}*/
|
|
2464
2487
|
|
|
2465
2488
|
/*{CA:PACKAGE_IMPORTS:START}*/
|
|
2466
|
-
const moment$7 = moment$
|
|
2489
|
+
const moment$7 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2467
2490
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
2468
2491
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
2469
2492
|
class AnnotationType {
|
|
@@ -2494,7 +2517,7 @@ class AnnotationType {
|
|
|
2494
2517
|
/*{CA:FILE_CONTENTS:START}*/
|
|
2495
2518
|
/*{CA:FILE_CONTENTS:END}*/
|
|
2496
2519
|
|
|
2497
|
-
const moment$8 = moment$
|
|
2520
|
+
const moment$8 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2498
2521
|
/*{CA:PACKAGE_IMPORTS:END}*/
|
|
2499
2522
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
2500
2523
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
@@ -2587,7 +2610,7 @@ class AnnotationHistory {
|
|
|
2587
2610
|
/*{CA:FILE_CONTENTS:START}*/
|
|
2588
2611
|
/*{CA:FILE_CONTENTS:END}*/
|
|
2589
2612
|
|
|
2590
|
-
const moment$9 = moment$
|
|
2613
|
+
const moment$9 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2591
2614
|
/*{CA:PACKAGE_IMPORTS:END}*/
|
|
2592
2615
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
2593
2616
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
@@ -2631,7 +2654,7 @@ class E030Ban {
|
|
|
2631
2654
|
/*{CA:FILE_CONTENTS:START}*/
|
|
2632
2655
|
/*{CA:FILE_CONTENTS:END}*/
|
|
2633
2656
|
|
|
2634
|
-
const moment$a = moment$
|
|
2657
|
+
const moment$a = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2635
2658
|
/*{CA:PACKAGE_IMPORTS:END}*/
|
|
2636
2659
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
2637
2660
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
@@ -2678,7 +2701,7 @@ class E030Age {
|
|
|
2678
2701
|
/*{CA:FILE_CONTENTS:START}*/
|
|
2679
2702
|
/*{CA:FILE_CONTENTS:END}*/
|
|
2680
2703
|
|
|
2681
|
-
const moment$b = moment$
|
|
2704
|
+
const moment$b = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2682
2705
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
2683
2706
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
2684
2707
|
class BankAccountHistory {
|
|
@@ -2954,8 +2977,8 @@ class DiseaseSubgroup {
|
|
|
2954
2977
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
2955
2978
|
static fromDto(diseaseSubgroupDto, originEntity) {
|
|
2956
2979
|
const model = Object.assign({}, diseaseSubgroupDto);
|
|
2957
|
-
model.createdDate = model.createdDate && moment$
|
|
2958
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
2980
|
+
model.createdDate = model.createdDate && moment$q(model.createdDate).toDate();
|
|
2981
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$q(model.lastModifiedDate).toDate();
|
|
2959
2982
|
const lookupSeparator = " - ";
|
|
2960
2983
|
const displayFields = [
|
|
2961
2984
|
"id",
|
|
@@ -2974,8 +2997,8 @@ class DiseaseSubgroup {
|
|
|
2974
2997
|
}
|
|
2975
2998
|
static toDto(diseaseSubgroup, originEntity) {
|
|
2976
2999
|
const dto = Object.assign({}, diseaseSubgroup);
|
|
2977
|
-
dto.createdDate = dto.createdDate && moment$
|
|
2978
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
3000
|
+
dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
|
|
3001
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
|
|
2979
3002
|
delete dto.label;
|
|
2980
3003
|
return dto;
|
|
2981
3004
|
}
|
|
@@ -2990,8 +3013,8 @@ class Disease {
|
|
|
2990
3013
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
2991
3014
|
static fromDto(diseaseDto, originEntity) {
|
|
2992
3015
|
const model = Object.assign({}, diseaseDto);
|
|
2993
|
-
model.createdDate = model.createdDate && moment$
|
|
2994
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
3016
|
+
model.createdDate = model.createdDate && moment$q(model.createdDate).toDate();
|
|
3017
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$q(model.lastModifiedDate).toDate();
|
|
2995
3018
|
const lookupSeparator = " - ";
|
|
2996
3019
|
const displayFields = [
|
|
2997
3020
|
"id",
|
|
@@ -3012,8 +3035,8 @@ class Disease {
|
|
|
3012
3035
|
}
|
|
3013
3036
|
static toDto(disease, originEntity) {
|
|
3014
3037
|
const dto = Object.assign({}, disease);
|
|
3015
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3016
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
3038
|
+
dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
|
|
3039
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
|
|
3017
3040
|
delete dto.label;
|
|
3018
3041
|
if (originEntity !== "DiseaseSubgroup" && dto.diseaseSubgroup)
|
|
3019
3042
|
dto.diseaseSubgroup = DiseaseSubgroup.toDto(dto.diseaseSubgroup, "Disease");
|
|
@@ -3030,8 +3053,8 @@ class Situation {
|
|
|
3030
3053
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
3031
3054
|
static fromDto(situationDto, originEntity) {
|
|
3032
3055
|
const model = Object.assign({}, situationDto);
|
|
3033
|
-
model.createdDate = model.createdDate && moment$
|
|
3034
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
3056
|
+
model.createdDate = model.createdDate && moment$q(model.createdDate).toDate();
|
|
3057
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$q(model.lastModifiedDate).toDate();
|
|
3035
3058
|
const lookupSeparator = " - ";
|
|
3036
3059
|
const displayFields = [
|
|
3037
3060
|
"id",
|
|
@@ -3051,8 +3074,8 @@ class Situation {
|
|
|
3051
3074
|
}
|
|
3052
3075
|
static toDto(situation, originEntity) {
|
|
3053
3076
|
const dto = Object.assign({}, situation);
|
|
3054
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3055
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
3077
|
+
dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
|
|
3078
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
|
|
3056
3079
|
delete dto.label;
|
|
3057
3080
|
return dto;
|
|
3058
3081
|
}
|
|
@@ -3068,12 +3091,12 @@ class LeaveHistory {
|
|
|
3068
3091
|
static fromDto(leaveHistoryDto, originEntity) {
|
|
3069
3092
|
var _a;
|
|
3070
3093
|
const model = Object.assign({}, leaveHistoryDto);
|
|
3071
|
-
model.startDate = model.startDate && moment$
|
|
3072
|
-
model.endDate = model.endDate && moment$
|
|
3073
|
-
model.birthDate = model.birthDate && moment$
|
|
3074
|
-
model.estimatedEndDate = model.estimatedEndDate && moment$
|
|
3075
|
-
model.createdDate = model.createdDate && moment$
|
|
3076
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
3094
|
+
model.startDate = model.startDate && moment$q(model.startDate).toDate();
|
|
3095
|
+
model.endDate = model.endDate && moment$q(model.endDate).toDate();
|
|
3096
|
+
model.birthDate = model.birthDate && moment$q(model.birthDate).toDate();
|
|
3097
|
+
model.estimatedEndDate = model.estimatedEndDate && moment$q(model.estimatedEndDate).toDate();
|
|
3098
|
+
model.createdDate = model.createdDate && moment$q(model.createdDate).toDate();
|
|
3099
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$q(model.lastModifiedDate).toDate();
|
|
3077
3100
|
const lookupSeparator = " - ";
|
|
3078
3101
|
const displayFields = [
|
|
3079
3102
|
"id",
|
|
@@ -3121,8 +3144,8 @@ class LeaveHistory {
|
|
|
3121
3144
|
static toDto(leaveHistory, originEntity) {
|
|
3122
3145
|
var _a;
|
|
3123
3146
|
const dto = Object.assign({}, leaveHistory);
|
|
3124
|
-
dto.startDate = dto.startDate && moment$
|
|
3125
|
-
dto.endDate = dto.endDate && moment$
|
|
3147
|
+
dto.startDate = dto.startDate && moment$q(dto.startDate).format("YYYY-MM-DD");
|
|
3148
|
+
dto.endDate = dto.endDate && moment$q(dto.endDate).format("YYYY-MM-DD");
|
|
3126
3149
|
if ((dto === null || dto === void 0 ? void 0 : dto.cnpjUnion) && typeof (dto === null || dto === void 0 ? void 0 : dto.cnpjUnion) === "string") {
|
|
3127
3150
|
dto.cnpjUnion = +dto.cnpjUnion.replaceAll(".", "").replaceAll("/", "").replaceAll("-", "");
|
|
3128
3151
|
}
|
|
@@ -3135,10 +3158,10 @@ class LeaveHistory {
|
|
|
3135
3158
|
if (!((_a = dto === null || dto === void 0 ? void 0 : dto.cnpjForElectiveMandatory) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
3136
3159
|
dto.cnpjForElectiveMandatory = null;
|
|
3137
3160
|
}
|
|
3138
|
-
dto.birthDate = dto.birthDate && moment$
|
|
3139
|
-
dto.estimatedEndDate = dto.estimatedEndDate && moment$
|
|
3140
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3141
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
3161
|
+
dto.birthDate = dto.birthDate && moment$q(dto.birthDate).format("YYYY-MM-DD");
|
|
3162
|
+
dto.estimatedEndDate = dto.estimatedEndDate && moment$q(dto.estimatedEndDate).format("YYYY-MM-DD");
|
|
3163
|
+
dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
|
|
3164
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
|
|
3142
3165
|
delete dto.label;
|
|
3143
3166
|
if (originEntity !== "Employee" && dto.employee)
|
|
3144
3167
|
dto.employee = Employee.toDto(dto.employee, "LeaveHistory");
|
|
@@ -3168,7 +3191,7 @@ class LeaveHistory {
|
|
|
3168
3191
|
const companyIds = (_b = filter === null || filter === void 0 ? void 0 : filter.companyIds) === null || _b === void 0 ? void 0 : _b.map((dto) => dto.id);
|
|
3169
3192
|
const advancedFilterId = (_c = filter === null || filter === void 0 ? void 0 : filter.advancedFilter) === null || _c === void 0 ? void 0 : _c.id;
|
|
3170
3193
|
const leaveHistoryDto = Object.assign({}, entity);
|
|
3171
|
-
const leaveHistoryBatchDTO = Object.assign(Object.assign({}, entity), { startDate: entity.startDate && moment$
|
|
3194
|
+
const leaveHistoryBatchDTO = Object.assign(Object.assign({}, entity), { startDate: entity.startDate && moment$q(entity.startDate).format("YYYY-MM-DD"), endDate: entity.endDate && moment$q(entity.endDate).format("YYYY-MM-DD"), situationId: entity.situation.id, estimatedEndDate: entity.estimatedEndDate && moment$q(entity.estimatedEndDate).format("YYYY-MM-DD") });
|
|
3172
3195
|
if (leaveHistoryBatchDTO.cnpjUnion && typeof leaveHistoryBatchDTO.cnpjUnion === "string") {
|
|
3173
3196
|
leaveHistoryBatchDTO.cnpjUnion = +leaveHistoryDto.cnpjUnion.replaceAll(".", "").replaceAll("/", "").replaceAll("-", "");
|
|
3174
3197
|
}
|
|
@@ -3199,9 +3222,9 @@ class ESocialReason {
|
|
|
3199
3222
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
3200
3223
|
static fromDto(eSocialReasonDto, originEntity) {
|
|
3201
3224
|
const model = Object.assign({}, eSocialReasonDto);
|
|
3202
|
-
model.competence = model.competence && moment$
|
|
3203
|
-
model.createdDate = model.createdDate && moment$
|
|
3204
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
3225
|
+
model.competence = model.competence && moment$q(model.competence).toDate();
|
|
3226
|
+
model.createdDate = model.createdDate && moment$q(model.createdDate).toDate();
|
|
3227
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$q(model.lastModifiedDate).toDate();
|
|
3205
3228
|
const lookupSeparator = " - ";
|
|
3206
3229
|
const displayFields = [
|
|
3207
3230
|
"id",
|
|
@@ -3220,9 +3243,9 @@ class ESocialReason {
|
|
|
3220
3243
|
}
|
|
3221
3244
|
static toDto(eSocialReason, originEntity) {
|
|
3222
3245
|
const dto = Object.assign({}, eSocialReason);
|
|
3223
|
-
dto.competence = dto.competence && moment$
|
|
3224
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3225
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
3246
|
+
dto.competence = dto.competence && moment$q(dto.competence).format("YYYY-MM-DD");
|
|
3247
|
+
dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
|
|
3248
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
|
|
3226
3249
|
delete dto.label;
|
|
3227
3250
|
if (originEntity !== "Situation" && dto.situation)
|
|
3228
3251
|
dto.situation = Situation.toDto(dto.situation, "ESocialReason");
|
|
@@ -3241,10 +3264,10 @@ class RegulatoryNormTrainingHistory {
|
|
|
3241
3264
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
3242
3265
|
static fromDto(regulatoryNormTrainingHistoryDto, originEntity) {
|
|
3243
3266
|
const model = Object.assign({}, regulatoryNormTrainingHistoryDto);
|
|
3244
|
-
model.startDate = model.startDate && moment$
|
|
3245
|
-
model.endDate = model.endDate && moment$
|
|
3246
|
-
model.createdDate = model.createdDate && moment$
|
|
3247
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
3267
|
+
model.startDate = model.startDate && moment$q(model.startDate).toDate();
|
|
3268
|
+
model.endDate = model.endDate && moment$q(model.endDate).toDate();
|
|
3269
|
+
model.createdDate = model.createdDate && moment$q(model.createdDate).toDate();
|
|
3270
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$q(model.lastModifiedDate).toDate();
|
|
3248
3271
|
const lookupSeparator = " - ";
|
|
3249
3272
|
const displayFields = [
|
|
3250
3273
|
"id",
|
|
@@ -3263,10 +3286,10 @@ class RegulatoryNormTrainingHistory {
|
|
|
3263
3286
|
}
|
|
3264
3287
|
static toDto(regulatoryNormTrainingHistory, originEntity) {
|
|
3265
3288
|
const dto = Object.assign({}, regulatoryNormTrainingHistory);
|
|
3266
|
-
dto.startDate = dto.startDate && moment$
|
|
3267
|
-
dto.endDate = dto.endDate && moment$
|
|
3268
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3269
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
3289
|
+
dto.startDate = dto.startDate && moment$q(dto.startDate).format("YYYY-MM-DD");
|
|
3290
|
+
dto.endDate = dto.endDate && moment$q(dto.endDate).format("YYYY-MM-DD");
|
|
3291
|
+
dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
|
|
3292
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
|
|
3270
3293
|
delete dto.label;
|
|
3271
3294
|
if (originEntity !== "Employee" && dto.employee)
|
|
3272
3295
|
dto.employee = Employee.toDto(dto.employee, "RegulatoryNormTrainingHistory");
|
|
@@ -3367,8 +3390,8 @@ class DateValidator {
|
|
|
3367
3390
|
const validator = (control) => {
|
|
3368
3391
|
let referenceDate = control && control.value;
|
|
3369
3392
|
if (referenceDate && dateFormat) {
|
|
3370
|
-
referenceDate = moment$
|
|
3371
|
-
const compareTo = moment$
|
|
3393
|
+
referenceDate = moment$q(control.value);
|
|
3394
|
+
const compareTo = moment$q(compareToDate, dateFormat);
|
|
3372
3395
|
return this.dateCompare(referenceDate, compareTo, compareType, options);
|
|
3373
3396
|
}
|
|
3374
3397
|
return null;
|
|
@@ -3509,7 +3532,7 @@ function removeErrorFromField(field, error) {
|
|
|
3509
3532
|
}
|
|
3510
3533
|
function startDateIsBeforeEndDateValidator(startDate, endDate) {
|
|
3511
3534
|
if (startDate && endDate && startDate.value && endDate.value) {
|
|
3512
|
-
const forbidden = moment$
|
|
3535
|
+
const forbidden = moment$q(startDate.value).isSameOrAfter(endDate.value) ? { startDateIsBeforeEndDate: { value: endDate.value } } : null;
|
|
3513
3536
|
if (forbidden) {
|
|
3514
3537
|
startDate.markAsDirty();
|
|
3515
3538
|
endDate.markAsDirty();
|
|
@@ -3529,7 +3552,7 @@ function startDateIsBeforeEndDateValidator(startDate, endDate) {
|
|
|
3529
3552
|
return null;
|
|
3530
3553
|
}
|
|
3531
3554
|
|
|
3532
|
-
const moment$c = moment$
|
|
3555
|
+
const moment$c = moment$q;
|
|
3533
3556
|
let BaseHistoryComponent = class BaseHistoryComponent {
|
|
3534
3557
|
constructor(translate, baseService, platformService, messageService) {
|
|
3535
3558
|
this.translate = translate;
|
|
@@ -3854,7 +3877,7 @@ FocusService = __decorate([
|
|
|
3854
3877
|
Injectable()
|
|
3855
3878
|
], FocusService);
|
|
3856
3879
|
|
|
3857
|
-
const moment$d = moment$
|
|
3880
|
+
const moment$d = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
3858
3881
|
let ClockingEventTimeEvaluationGeneralService = class ClockingEventTimeEvaluationGeneralService {
|
|
3859
3882
|
constructor(http) {
|
|
3860
3883
|
this.http = http;
|
|
@@ -4231,7 +4254,7 @@ BaseHistoryModule = __decorate([
|
|
|
4231
4254
|
})
|
|
4232
4255
|
], BaseHistoryModule);
|
|
4233
4256
|
|
|
4234
|
-
const moment$e = moment$
|
|
4257
|
+
const moment$e = moment$q;
|
|
4235
4258
|
let BaseCollectiveHistoryComponent = class BaseCollectiveHistoryComponent extends BaseHistoryComponent {
|
|
4236
4259
|
constructor(translate, baseService, platformService, messageService, collectiveService) {
|
|
4237
4260
|
super(translate, baseService, platformService, messageService);
|
|
@@ -4439,7 +4462,7 @@ var ProfileType;
|
|
|
4439
4462
|
})(ProfileType || (ProfileType = {}));
|
|
4440
4463
|
|
|
4441
4464
|
var ClockingEventComponent_1;
|
|
4442
|
-
const moment$f = moment$
|
|
4465
|
+
const moment$f = moment$q;
|
|
4443
4466
|
let ClockingEventComponent = ClockingEventComponent_1 = class ClockingEventComponent extends BaseCollectiveHistoryComponent {
|
|
4444
4467
|
constructor(translate, baseService, employeeService, platformService, messageService, leaveHistoryBffService) {
|
|
4445
4468
|
super(translate, baseService, platformService, messageService);
|
|
@@ -4651,7 +4674,7 @@ ClockingEventComponent = ClockingEventComponent_1 = __decorate([
|
|
|
4651
4674
|
], ClockingEventComponent);
|
|
4652
4675
|
|
|
4653
4676
|
var WorkshiftHistoryFormComponent_1;
|
|
4654
|
-
const moment$g = moment$
|
|
4677
|
+
const moment$g = moment$q;
|
|
4655
4678
|
let WorkshiftHistoryFormComponent = WorkshiftHistoryFormComponent_1 = class WorkshiftHistoryFormComponent extends ClockingEventComponent {
|
|
4656
4679
|
constructor(workshiftHistoryService, router, route, messageService, confirmationService, formBuilder, translate, hotkeysService, fieldCustomization, focusService, workshiftGroupService, employeeService, cd, baseService, clockingEventFoundationGeneralService, platformService, workshiftLookupService, collectiveService, workshiftHistoryAdjustmentService, employeeLibService, workshiftInformationHistoryService) {
|
|
4657
4680
|
super(translate, baseService, employeeService, platformService, messageService);
|
|
@@ -5394,7 +5417,7 @@ E070FilService = __decorate([
|
|
|
5394
5417
|
/*{CA:FILE_CONTENTS:START}*/
|
|
5395
5418
|
/*{CA:FILE_CONTENTS:END}*/
|
|
5396
5419
|
|
|
5397
|
-
const moment$h = moment$
|
|
5420
|
+
const moment$h = moment$q;
|
|
5398
5421
|
let WorkshiftHistoryListComponent = class WorkshiftHistoryListComponent extends BaseCollectiveHistoryComponent {
|
|
5399
5422
|
constructor(
|
|
5400
5423
|
/*{CA:INJECTIONS:START}*/
|
|
@@ -6459,7 +6482,7 @@ ClockingEventModule = __decorate([
|
|
|
6459
6482
|
})
|
|
6460
6483
|
], ClockingEventModule);
|
|
6461
6484
|
|
|
6462
|
-
const moment$i = moment$
|
|
6485
|
+
const moment$i = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
6463
6486
|
function mapLookupFilterQuery(value, type, name) {
|
|
6464
6487
|
if (typeof value == "number")
|
|
6465
6488
|
return `${name} eq ${value}`;
|
|
@@ -6644,13 +6667,13 @@ let EmployeeLookupService = class EmployeeLookupService {
|
|
|
6644
6667
|
return `${name} eq ${value}`;
|
|
6645
6668
|
}
|
|
6646
6669
|
else if (type === FieldType.Date) {
|
|
6647
|
-
return `${name} eq '${moment$
|
|
6670
|
+
return `${name} eq '${moment$q(value).format("YYYY-MM-DD")}'`;
|
|
6648
6671
|
}
|
|
6649
6672
|
else if (type === FieldType.Time) {
|
|
6650
|
-
return `${name} eq '${moment$
|
|
6673
|
+
return `${name} eq '${moment$q(value).format("HH:mm:ss")}'`;
|
|
6651
6674
|
}
|
|
6652
6675
|
else if (type === FieldType.DateTime) {
|
|
6653
|
-
return `${name} eq '${moment$
|
|
6676
|
+
return `${name} eq '${moment$q(value).format()}'`;
|
|
6654
6677
|
}
|
|
6655
6678
|
else if (type === FieldType.Enum) {
|
|
6656
6679
|
return `${name} eq '${value}'`;
|
|
@@ -6685,13 +6708,13 @@ let EmployeeLookupService = class EmployeeLookupService {
|
|
|
6685
6708
|
return `${name} eq ${value}`;
|
|
6686
6709
|
}
|
|
6687
6710
|
else if (type === FieldType.Date) {
|
|
6688
|
-
return `${name} eq '${moment$
|
|
6711
|
+
return `${name} eq '${moment$q(value).format("YYYY-MM-DD")}'`;
|
|
6689
6712
|
}
|
|
6690
6713
|
else if (type === FieldType.Time) {
|
|
6691
|
-
return `${name} eq '${moment$
|
|
6714
|
+
return `${name} eq '${moment$q(value).format("HH:mm:ss")}'`;
|
|
6692
6715
|
}
|
|
6693
6716
|
else if (type === FieldType.DateTime) {
|
|
6694
|
-
return `${name} eq '${moment$
|
|
6717
|
+
return `${name} eq '${moment$q(value).format()}'`;
|
|
6695
6718
|
}
|
|
6696
6719
|
else if (type === FieldType.Enum) {
|
|
6697
6720
|
return this.loadEnumFromLabel(value)
|
|
@@ -7288,7 +7311,7 @@ WorkshiftHistoryFeatureModule = __decorate([
|
|
|
7288
7311
|
], WorkshiftHistoryFeatureModule);
|
|
7289
7312
|
|
|
7290
7313
|
var AnnotationHistoryFormComponent_1;
|
|
7291
|
-
const moment$j = moment$
|
|
7314
|
+
const moment$j = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
7292
7315
|
let AnnotationHistoryFormComponent = AnnotationHistoryFormComponent_1 = class AnnotationHistoryFormComponent extends ClockingEventComponent {
|
|
7293
7316
|
constructor(annotationHistoryService, router, route, messageService, confirmationService, formBuilder, translate, hotkeysService, fieldCustomization, focusService, annotationTypeLookupService, employeeService, baseService, platformService, cd, collectiveService, sanitizer, annotationHistoryAttachmentService, employeeLookupService) {
|
|
7294
7317
|
super(translate, baseService, employeeService, platformService, messageService);
|
|
@@ -8007,7 +8030,7 @@ AnnotationHistoryFormComponent = AnnotationHistoryFormComponent_1 = __decorate([
|
|
|
8007
8030
|
/*{CA:FILE_CONTENTS:END}*/
|
|
8008
8031
|
|
|
8009
8032
|
/*{CA:EXTERNAL_IMPORTS:START}*/
|
|
8010
|
-
const moment$k = moment$
|
|
8033
|
+
const moment$k = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
8011
8034
|
/*{CA:EXTERNAL_IMPORTS:END}*/
|
|
8012
8035
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
8013
8036
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
@@ -10906,7 +10929,7 @@ let LeaveHistoryFormComponent = LeaveHistoryFormComponent_1 = class LeaveHistory
|
|
|
10906
10929
|
if (employeeId && referenceDate) {
|
|
10907
10930
|
const estimatedJourneyCompleted = this.formGroup.get("estimatedJourneyCompleted").value;
|
|
10908
10931
|
const actualReferenceDate = (estimatedJourneyCompleted ?
|
|
10909
|
-
moment$
|
|
10932
|
+
moment$q(referenceDate).format("YYYY-MM-DDTHH:mm:ss-00:00") : referenceDate);
|
|
10910
10933
|
return this.getObservable(employeeId, actualReferenceDate);
|
|
10911
10934
|
}
|
|
10912
10935
|
else {
|
|
@@ -11585,7 +11608,7 @@ let LeaveHistoryFormComponent = LeaveHistoryFormComponent_1 = class LeaveHistory
|
|
|
11585
11608
|
const startDate = this.formGroup.get("startDate").value;
|
|
11586
11609
|
const estimatedEndDate = this.formGroup.get("estimatedEndDate").value;
|
|
11587
11610
|
if (startDate && estimatedEndDate) {
|
|
11588
|
-
const estimatedDayEnd = moment$
|
|
11611
|
+
const estimatedDayEnd = moment$q(estimatedEndDate).diff(moment$q(startDate), "days") + 1;
|
|
11589
11612
|
control.setValue(estimatedDayEnd);
|
|
11590
11613
|
}
|
|
11591
11614
|
}
|
|
@@ -11606,7 +11629,7 @@ let LeaveHistoryFormComponent = LeaveHistoryFormComponent_1 = class LeaveHistory
|
|
|
11606
11629
|
const startDate = this.formGroup.get("startDate").value;
|
|
11607
11630
|
const estimatedDayEnd = this.formGroup.get("estimatedDayEnd").value;
|
|
11608
11631
|
if (startDate && estimatedDayEnd) {
|
|
11609
|
-
const estimatedEndDate = moment$
|
|
11632
|
+
const estimatedEndDate = moment$q(startDate).add(estimatedDayEnd, "days").add(-1, "day").toDate();
|
|
11610
11633
|
control.setValue(estimatedEndDate);
|
|
11611
11634
|
}
|
|
11612
11635
|
}
|
|
@@ -11640,7 +11663,7 @@ let LeaveHistoryFormComponent = LeaveHistoryFormComponent_1 = class LeaveHistory
|
|
|
11640
11663
|
return this.formGroupDependent(() => {
|
|
11641
11664
|
const startDate = this.formGroup.get("startDate").value;
|
|
11642
11665
|
const estimatedEndDate = this.formGroup.get("estimatedEndDate").value;
|
|
11643
|
-
if (startDate && estimatedEndDate && moment$
|
|
11666
|
+
if (startDate && estimatedEndDate && moment$q(startDate).isAfter(moment$q(estimatedEndDate))) {
|
|
11644
11667
|
return { estimatedEndDateMustBeGreaterThanOrEqualToStartDate: true };
|
|
11645
11668
|
}
|
|
11646
11669
|
return null;
|
|
@@ -11659,8 +11682,8 @@ let LeaveHistoryFormComponent = LeaveHistoryFormComponent_1 = class LeaveHistory
|
|
|
11659
11682
|
const startDateValue = this.formGroup.get("startDate").value;
|
|
11660
11683
|
const endDateValue = this.formGroup.get("endDate").value;
|
|
11661
11684
|
const estimatedJourneyCompletedValue = this.formGroup.get("estimatedJourneyCompleted").value;
|
|
11662
|
-
const startTimeValue = estimatedJourneyCompletedValue ? moment$
|
|
11663
|
-
const endTimeValue = estimatedJourneyCompletedValue ? moment$
|
|
11685
|
+
const startTimeValue = estimatedJourneyCompletedValue ? moment$q().hours(0).minutes(0) : this.formGroup.get("startTime").value;
|
|
11686
|
+
const endTimeValue = estimatedJourneyCompletedValue ? moment$q().hours(23).minutes(59) : this.formGroup.get("endTime").value;
|
|
11664
11687
|
const startDateTimeConcat = this.getFullDateTime(startDateValue, startTimeValue);
|
|
11665
11688
|
const endDateTimeConcat = this.getFullDateTime(endDateValue, endTimeValue);
|
|
11666
11689
|
if (startDateValue && startTimeValue && endDateValue && endTimeValue && startDateTimeConcat.isAfter(endDateTimeConcat)) {
|
|
@@ -11692,8 +11715,8 @@ let LeaveHistoryFormComponent = LeaveHistoryFormComponent_1 = class LeaveHistory
|
|
|
11692
11715
|
const value = control.value;
|
|
11693
11716
|
const startDate = this.formGroup.get("startDate").value;
|
|
11694
11717
|
const endDate = this.formGroup.get("endDate").value;
|
|
11695
|
-
const startDatePlusJustifiedDays = (startDate && value) && (moment$
|
|
11696
|
-
if (endDate && startDatePlusJustifiedDays && moment$
|
|
11718
|
+
const startDatePlusJustifiedDays = (startDate && value) && (moment$q(startDate).add(value, "days").subtract(1, "days"));
|
|
11719
|
+
if (endDate && startDatePlusJustifiedDays && moment$q(startDatePlusJustifiedDays).isAfter(endDate)) {
|
|
11697
11720
|
return { justifiedDaysQuantityMustBeLowerThanEndDate: true };
|
|
11698
11721
|
}
|
|
11699
11722
|
return null;
|
|
@@ -11702,7 +11725,7 @@ let LeaveHistoryFormComponent = LeaveHistoryFormComponent_1 = class LeaveHistory
|
|
|
11702
11725
|
getTimeIsNotZeroValidator() {
|
|
11703
11726
|
return this.formGroupDependent((control) => {
|
|
11704
11727
|
const value = control.value;
|
|
11705
|
-
const convertedValue = value && moment$
|
|
11728
|
+
const convertedValue = value && moment$q(value).isValid() && moment$q(value).format("HH:mm");
|
|
11706
11729
|
const isDateTimeZero = convertedValue === "00:00";
|
|
11707
11730
|
if (isDateTimeZero) {
|
|
11708
11731
|
return { timeMustNotBeZero: true };
|
|
@@ -11724,7 +11747,7 @@ let LeaveHistoryFormComponent = LeaveHistoryFormComponent_1 = class LeaveHistory
|
|
|
11724
11747
|
if (time) {
|
|
11725
11748
|
return mergeDateTime(date, time);
|
|
11726
11749
|
}
|
|
11727
|
-
return moment$
|
|
11750
|
+
return moment$q(date);
|
|
11728
11751
|
}
|
|
11729
11752
|
return null;
|
|
11730
11753
|
}
|
|
@@ -11736,10 +11759,10 @@ let LeaveHistoryFormComponent = LeaveHistoryFormComponent_1 = class LeaveHistory
|
|
|
11736
11759
|
const estimatedJourneyCompletedControl = this.formGroup.get("estimatedJourneyCompleted");
|
|
11737
11760
|
if (this.isHourAndMinuteZero(startTimeControl.value)) {
|
|
11738
11761
|
estimatedJourneyCompletedControl.setValue(true);
|
|
11739
|
-
startDateControl.setValue(moment$
|
|
11762
|
+
startDateControl.setValue(moment$q(startDateControl.value).toDate());
|
|
11740
11763
|
startTimeControl.setValue(null);
|
|
11741
11764
|
if (endDateControl.value) {
|
|
11742
|
-
endDateControl.setValue(moment$
|
|
11765
|
+
endDateControl.setValue(moment$q(endDateControl.value).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).toDate());
|
|
11743
11766
|
}
|
|
11744
11767
|
endTimeControl.setValue(null);
|
|
11745
11768
|
this.setEnabledStatus(endTimeControl, false);
|
|
@@ -11752,7 +11775,7 @@ let LeaveHistoryFormComponent = LeaveHistoryFormComponent_1 = class LeaveHistory
|
|
|
11752
11775
|
this.setEnabledStatus(estimatedJourneyCompletedControl, false);
|
|
11753
11776
|
}
|
|
11754
11777
|
isHourAndMinuteZero(value) {
|
|
11755
|
-
return moment$
|
|
11778
|
+
return moment$q(value).hours() === 0 && moment$q(value).minutes() === 0;
|
|
11756
11779
|
}
|
|
11757
11780
|
loadLabelFromEnumOptions(value, enumOptions) {
|
|
11758
11781
|
const foundEnum = enumOptions.filter(r => r.value === value) || this.situationTypeOptions.filter(r => r.value === value);
|
|
@@ -11784,7 +11807,7 @@ let LeaveHistoryFormComponent = LeaveHistoryFormComponent_1 = class LeaveHistory
|
|
|
11784
11807
|
}
|
|
11785
11808
|
else {
|
|
11786
11809
|
const leaveHistory = new LeaveHistory();
|
|
11787
|
-
leaveHistory.startDate = startDate ? moment$
|
|
11810
|
+
leaveHistory.startDate = startDate ? moment$q(startDate).toDate() : leaveHistory.startDate;
|
|
11788
11811
|
leaveHistory.employee = Employee.fromDto(dtoContent);
|
|
11789
11812
|
this.startFuncionsByBaseHistory();
|
|
11790
11813
|
this.applyAllFieldBehaviour();
|
|
@@ -12001,7 +12024,7 @@ LeaveHistoryFormComponent = LeaveHistoryFormComponent_1 = __decorate([
|
|
|
12001
12024
|
/*{CA:FILE_CONTENTS:START}*/
|
|
12002
12025
|
/*{CA:FILE_CONTENTS:END}*/
|
|
12003
12026
|
|
|
12004
|
-
const moment$l = moment$
|
|
12027
|
+
const moment$l = moment$q;
|
|
12005
12028
|
let LeaveHistoryListComponent = class LeaveHistoryListComponent extends BaseCollectiveHistoryComponent {
|
|
12006
12029
|
constructor(router, route, leaveHistoryService, confirmationService, situationService, translate, baseService, messageService, hotkeysService, formBuilder, filtersStorageService, paginatorStorageService, companyService, companyBranchService, employeeLookupService, platformService, configService) {
|
|
12007
12030
|
super(translate, baseService, platformService, messageService);
|
|
@@ -12917,7 +12940,7 @@ LeaveHistoryFeatureModule = __decorate([
|
|
|
12917
12940
|
})
|
|
12918
12941
|
], LeaveHistoryFeatureModule);
|
|
12919
12942
|
|
|
12920
|
-
const moment$m = moment$
|
|
12943
|
+
const moment$m = moment$q;
|
|
12921
12944
|
let BankAccountItemComponent = class BankAccountItemComponent {
|
|
12922
12945
|
constructor(
|
|
12923
12946
|
/*{CA:INJECTIONS:START}*/
|
|
@@ -13523,60 +13546,6 @@ BankAccountItemModule = __decorate([
|
|
|
13523
13546
|
})
|
|
13524
13547
|
], BankAccountItemModule);
|
|
13525
13548
|
|
|
13526
|
-
const fallback = {
|
|
13527
|
-
"hcm_contract.employment_contract.employee_has_workshift_change_in_period": "Existe uma programação de troca de escala no período de {{ startDate }} a {{ endDate }}. Este histórico não será considerado para apuração.",
|
|
13528
|
-
"hcm_contract.employment_additional_info.annotation_history": "Histórico de Anotação",
|
|
13529
|
-
"hcm_contract.employment_additional_info.annotation_history_annotation": "Anotação",
|
|
13530
|
-
"hcm_contract.employment_additional_info.annotation_history_contract": "Colaborador",
|
|
13531
|
-
"hcm_contract.employment_additional_info.annotation_history_contract_code": "Colaborador",
|
|
13532
|
-
"hcm_contract.employment_additional_info.annotation_history_contract_person_nom_pes": "Nome do colaborador",
|
|
13533
|
-
"hcm_contract.employment_additional_info.annotation_history_contract_search_title": "Colaborador",
|
|
13534
|
-
"hcm_contract.employment_additional_info.annotation_history_date": "Data",
|
|
13535
|
-
"hcm_contract.employment_contract.admission_generic_field_validator_editable": "Campo desabilitado para edição.",
|
|
13536
|
-
"hcm_contract.employment_additional_info.annotation_history_document_number": "Número do documento",
|
|
13537
|
-
"hcm_contract.employment_additional_info.annotation_history_employee": "Colaborador",
|
|
13538
|
-
"hcm_contract.employment_additional_info.annotation_history_empty_state_description": "Não há registros cadastrados até o momento.",
|
|
13539
|
-
"hcm_contract.employment_additional_info.annotation_history_empty_state_title": "Nenhum resultado encontrado",
|
|
13540
|
-
"hcm_contract.employment_additional_info.annotation_history_form_general_title": "Histórico de anotação",
|
|
13541
|
-
"hcm_contract.employment_additional_info.annotation_history_form_title": "Histórico de anotação",
|
|
13542
|
-
"hcm_contract.employment_additional_info.annotation_history_id": "Identificador único",
|
|
13543
|
-
"hcm_contract.employment_additional_info.annotation_history_list_grid_title": "Lista de históricos de anotação",
|
|
13544
|
-
"hcm_contract.employment_additional_info.annotation_history_list_title": "Histórico de anotação",
|
|
13545
|
-
"hcm_contract.employment_additional_info.annotation_history_responsible": "Responsável",
|
|
13546
|
-
"hcm_contract.employment_additional_info.annotation_history_responsible_search_title": "Responsável",
|
|
13547
|
-
"hcm_contract.employment_additional_info.annotation_history_type": "Tipo",
|
|
13548
|
-
"hcm_contract.employment_additional_info.annotation_history_type_code": "Tipo",
|
|
13549
|
-
"hcm_contract.employment_additional_info.annotation_history_type_name": "Descrição do tipo",
|
|
13550
|
-
"hcm_contract.employment_additional_info.annotation_history_type_search_title": "Tipo",
|
|
13551
|
-
"hcm_contract.employment_additional_info.annotation_history_employee_code": "Código",
|
|
13552
|
-
"hcm_contract.employment_additional_info.annotation_history_employee_person_nom_pes": "Nome do colaborador",
|
|
13553
|
-
"hcm_contract.employment_additional_info.annotation_history_employee_search_title": "Colaborador",
|
|
13554
|
-
"hcm_contract.employment_additional_info.employee_employment_relationship_contract_type": "Tipo de contrato",
|
|
13555
|
-
"hcm_contract.employment_additional_info.contract_type_aprentice": "Aprendiz",
|
|
13556
|
-
"hcm_contract.employment_additional_info.contract_type_director": "Diretor",
|
|
13557
|
-
"hcm_contract.employment_additional_info.contract_type_employee": "Empregado",
|
|
13558
|
-
"hcm_contract.employment_additional_info.contract_type_third_party": "Terceiro",
|
|
13559
|
-
"hcm_contract.employment_additional_info.contract_type_trainee": "Estagiário",
|
|
13560
|
-
"hcm_contract.employment_additional_info.employee_employer_cod_emp": "Código da empresa",
|
|
13561
|
-
"hcm_contract.employment_additional_info.employee_code": "Cadastro",
|
|
13562
|
-
"hcm_contract.employment_additional_info.employee_person_nom_pes": "Nome do colaborador",
|
|
13563
|
-
"hcm_contract.employment_additional_info.filter": "Filtrar",
|
|
13564
|
-
"hcm_contract.employment_additional_info.filters": "Filtros",
|
|
13565
|
-
"hcm_contract.employment_additional_info.total_records": "{{value}} registro(s) encontrado(s)",
|
|
13566
|
-
"hcm_contract.employment_additional_info.records_found": "registro(s) encontrado(s)",
|
|
13567
|
-
"hcm_contract.employment_additional_info.cancel": "Cancelar",
|
|
13568
|
-
"hcm_contract.employment_additional_info.select": "Selecionar",
|
|
13569
|
-
"hcm_contract.employment_additional_info.clear": "Limpar",
|
|
13570
|
-
"hcm_contract.employment_additional_info.annotation_type_code": "Tipo",
|
|
13571
|
-
"hcm_contract.employment_additional_info.annotation_type_name": "Descrição do tipo",
|
|
13572
|
-
"hcm_contract.employment_additional_info.saved_message_content": "Registro(s) salvo(s) com sucesso.",
|
|
13573
|
-
"hcm_contract.employment_additional_info.saved_message_title": "Sucesso",
|
|
13574
|
-
"hcm_contract.employment_additional_info.nothing_found": "Nenhum registro encontrado",
|
|
13575
|
-
"hcm_contract.employment_contract.add_employee_dependent": "Adicionar dependente",
|
|
13576
|
-
"hcm_contract.employment_contract.employee_dependent_list": "Dependentes",
|
|
13577
|
-
"hcm_contract.employment_contract.employee_dependent_list_kinship": "Parentesco"
|
|
13578
|
-
};
|
|
13579
|
-
|
|
13580
13549
|
var ESocialTrainingCodeType;
|
|
13581
13550
|
(function (ESocialTrainingCodeType) {
|
|
13582
13551
|
ESocialTrainingCodeType["V1006"] = "V1006";
|
|
@@ -13647,7 +13616,7 @@ let RegulatoryNormTrainingHistoryListComponent = class RegulatoryNormTrainingHis
|
|
|
13647
13616
|
}
|
|
13648
13617
|
setStartDateValidator() {
|
|
13649
13618
|
return (control) => {
|
|
13650
|
-
if (this.personBirthDate && control.value && moment$
|
|
13619
|
+
if (this.personBirthDate && control.value && moment$q(control.value).isBefore(moment$q(this.personBirthDate), "day")) {
|
|
13651
13620
|
return { startDateBeforeBirthdate: true };
|
|
13652
13621
|
}
|
|
13653
13622
|
else {
|
|
@@ -13719,7 +13688,7 @@ let RegulatoryNormTrainingHistoryListComponent = class RegulatoryNormTrainingHis
|
|
|
13719
13688
|
if (this.formArray) {
|
|
13720
13689
|
this.formArray.controls.forEach((form) => {
|
|
13721
13690
|
let control = form.get('startDate');
|
|
13722
|
-
if (this.personBirthDate && control.value && moment$
|
|
13691
|
+
if (this.personBirthDate && control.value && moment$q(control.value).isBefore(moment$q(this.personBirthDate), "day")) {
|
|
13723
13692
|
control.setErrors({ startDateBeforeBirthdate: true });
|
|
13724
13693
|
}
|
|
13725
13694
|
else {
|
|
@@ -14023,6 +13992,24 @@ EmployeeSummaryModule = __decorate([
|
|
|
14023
13992
|
})
|
|
14024
13993
|
], EmployeeSummaryModule);
|
|
14025
13994
|
|
|
13995
|
+
let DependentDraftService = class DependentDraftService extends EntityService {
|
|
13996
|
+
constructor(http, messageService, translate) {
|
|
13997
|
+
super(http, messageService, `hcm_contract/employment_contract/entities/dependentDraft`, `hcm_contract/employment_contract/actions`, translate);
|
|
13998
|
+
this.http = http;
|
|
13999
|
+
this.messageService = messageService;
|
|
14000
|
+
this.translate = translate;
|
|
14001
|
+
this.saveDraftEvent = new Subject();
|
|
14002
|
+
}
|
|
14003
|
+
};
|
|
14004
|
+
DependentDraftService.ctorParameters = () => [
|
|
14005
|
+
{ type: HttpClient },
|
|
14006
|
+
{ type: MessageService },
|
|
14007
|
+
{ type: TranslateService }
|
|
14008
|
+
];
|
|
14009
|
+
DependentDraftService = __decorate([
|
|
14010
|
+
Injectable()
|
|
14011
|
+
], DependentDraftService);
|
|
14012
|
+
|
|
14026
14013
|
let CountryService = class CountryService extends EntityService {
|
|
14027
14014
|
constructor(http, messageService, translate) {
|
|
14028
14015
|
super(http, messageService, `platform/localization/entities/country`, `platform/localization/entities/actions`, translate);
|
|
@@ -14556,8 +14543,63 @@ EmployeeDependentDocumentTabComponent = __decorate([
|
|
|
14556
14543
|
})
|
|
14557
14544
|
], EmployeeDependentDocumentTabComponent);
|
|
14558
14545
|
|
|
14546
|
+
class DependentDraft {
|
|
14547
|
+
static fromDto(dependentDraftDto) {
|
|
14548
|
+
const parse = (dependentDraftDto === null || dependentDraftDto === void 0 ? void 0 : dependentDraftDto.data) && JSON.parse(dependentDraftDto.data);
|
|
14549
|
+
const model = {
|
|
14550
|
+
basicDependentPersonData: parse.basicDependentPersonData ? this.normalizeDraft(parse.basicDependentPersonData) : {},
|
|
14551
|
+
documentDependentPersonData: parse.documentDependentPersonData ? this.normalizeDraft(parse.documentDependentPersonData) : {},
|
|
14552
|
+
complementDependentPersonData: parse.complementDependentPersonData
|
|
14553
|
+
? this.normalizeDraft(parse.complementDependentPersonData) : {},
|
|
14554
|
+
};
|
|
14555
|
+
return model;
|
|
14556
|
+
}
|
|
14557
|
+
static toDto(dependentDraft, employeeId, admissionDraftId) {
|
|
14558
|
+
var _a, _b;
|
|
14559
|
+
const dto = {};
|
|
14560
|
+
dto.personName = (_a = dependentDraft === null || dependentDraft === void 0 ? void 0 : dependentDraft.basicDependentPersonData) === null || _a === void 0 ? void 0 : _a.fullName;
|
|
14561
|
+
dto.kinshipDegreeType = (_b = dependentDraft === null || dependentDraft === void 0 ? void 0 : dependentDraft.complementDependentPersonData) === null || _b === void 0 ? void 0 : _b.kinshipDependentDegreeType;
|
|
14562
|
+
dto.employee = employeeId ? { id: employeeId } : null;
|
|
14563
|
+
dto.admissionDraft = admissionDraftId ? { id: admissionDraftId } : null;
|
|
14564
|
+
dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
|
|
14565
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
|
|
14566
|
+
dto.data = JSON.stringify({
|
|
14567
|
+
basicDependentPersonData: dependentDraft.basicDependentPersonData,
|
|
14568
|
+
documentDependentPersonData: dependentDraft.documentDependentPersonData,
|
|
14569
|
+
complementDependentPersonData: dependentDraft.complementDependentPersonData,
|
|
14570
|
+
});
|
|
14571
|
+
return dto;
|
|
14572
|
+
}
|
|
14573
|
+
static normalizeDraft(obj) {
|
|
14574
|
+
if (!obj || typeof obj !== "object") {
|
|
14575
|
+
return obj;
|
|
14576
|
+
}
|
|
14577
|
+
Object.keys(obj).forEach(key => {
|
|
14578
|
+
const value = obj[key];
|
|
14579
|
+
if (value === "") {
|
|
14580
|
+
obj[key] = null;
|
|
14581
|
+
return;
|
|
14582
|
+
}
|
|
14583
|
+
if (typeof value === "string" && /^\d{4}-\d{2}-\d{2}$/.test(value)) {
|
|
14584
|
+
const date = new Date(value + "T00:00:00");
|
|
14585
|
+
obj[key] = isNaN(date.getTime()) ? null : date;
|
|
14586
|
+
return;
|
|
14587
|
+
}
|
|
14588
|
+
if (typeof value === "string" && /^\d{4}-\d{2}-\d{2}T/.test(value)) {
|
|
14589
|
+
const date = new Date(value);
|
|
14590
|
+
obj[key] = isNaN(date.getTime()) ? null : date;
|
|
14591
|
+
return;
|
|
14592
|
+
}
|
|
14593
|
+
if (value && typeof value === "object") {
|
|
14594
|
+
this.normalizeDraft(value);
|
|
14595
|
+
}
|
|
14596
|
+
});
|
|
14597
|
+
return obj;
|
|
14598
|
+
}
|
|
14599
|
+
}
|
|
14600
|
+
|
|
14559
14601
|
function validateDate(dateS, format = "DD/MM/YYYY") {
|
|
14560
|
-
return moment$
|
|
14602
|
+
return moment$q(dateS, format).toDate();
|
|
14561
14603
|
}
|
|
14562
14604
|
function mapFormToDependentSave(ef, employeeId, dependentId, personId, dateFormat) {
|
|
14563
14605
|
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, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19;
|
|
@@ -14569,7 +14611,7 @@ function mapFormToDependentSave(ef, employeeId, dependentId, personId, dateForma
|
|
|
14569
14611
|
nickname: ((_c = ef === null || ef === void 0 ? void 0 : ef.basicDependentPersonData) === null || _c === void 0 ? void 0 : _c.nickname) || "",
|
|
14570
14612
|
genderType: ((_d = ef === null || ef === void 0 ? void 0 : ef.basicDependentPersonData) === null || _d === void 0 ? void 0 : _d.genderType) || null,
|
|
14571
14613
|
birthDate: ((_e = ef === null || ef === void 0 ? void 0 : ef.basicDependentPersonData) === null || _e === void 0 ? void 0 : _e.birthDate) ?
|
|
14572
|
-
moment$
|
|
14614
|
+
moment$q(validateDate((_f = ef === null || ef === void 0 ? void 0 : ef.basicDependentPersonData) === null || _f === void 0 ? void 0 : _f.birthDate, dateFormat)).format(dateFormatToSave) : null,
|
|
14573
14615
|
email: Array.isArray((_g = ef === null || ef === void 0 ? void 0 : ef.basicDependentPersonData) === null || _g === void 0 ? void 0 : _g.email) ? ef.basicDependentPersonData.email.join(", ") : ((_h = ef === null || ef === void 0 ? void 0 : ef.basicDependentPersonData) === null || _h === void 0 ? void 0 : _h.email) || "",
|
|
14574
14616
|
kinshipDependentDegreeType: ((_j = ef === null || ef === void 0 ? void 0 : ef.complementDependentPersonData) === null || _j === void 0 ? void 0 : _j.kinshipDependentDegreeType) || null,
|
|
14575
14617
|
kinshipDegreeType: ((_k = ef === null || ef === void 0 ? void 0 : ef.complementDependentPersonData) === null || _k === void 0 ? void 0 : _k.kinshipDegreeType) || null,
|
|
@@ -14588,10 +14630,10 @@ function mapFormToDependentSave(ef, employeeId, dependentId, personId, dateForma
|
|
|
14588
14630
|
rgIssuer: ((_x = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _x === void 0 ? void 0 : _x.rgIssuer) || "",
|
|
14589
14631
|
rgIssuerStateId: ((_z = (_y = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _y === void 0 ? void 0 : _y.rgIssuerStateId) === null || _z === void 0 ? void 0 : _z.id) || ((_1 = (_0 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _0 === void 0 ? void 0 : _0.rgIssuerStateId) === null || _1 === void 0 ? void 0 : _1.key) || null,
|
|
14590
14632
|
rgIssueDate: ((_2 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _2 === void 0 ? void 0 : _2.rgIssueDate) ?
|
|
14591
|
-
moment$
|
|
14633
|
+
moment$q(validateDate((_3 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _3 === void 0 ? void 0 : _3.rgIssueDate, dateFormat)).format(dateFormatToSave) : null,
|
|
14592
14634
|
civilCertificateType: ((_4 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _4 === void 0 ? void 0 : _4.civilCertificateType) || null,
|
|
14593
14635
|
civilCertificateIssueDate: ((_5 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _5 === void 0 ? void 0 : _5.civilCertificateIssueDate) ?
|
|
14594
|
-
moment$
|
|
14636
|
+
moment$q(validateDate((_6 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _6 === void 0 ? void 0 : _6.civilCertificateIssueDate, dateFormat)).format(dateFormatToSave) : null,
|
|
14595
14637
|
civilCertificateRegisterNumber: ((_7 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _7 === void 0 ? void 0 : _7.civilCertificateRegisterNumber) || "",
|
|
14596
14638
|
civilCertificateTerm: ((_8 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _8 === void 0 ? void 0 : _8.civilCertificateTerm) || "",
|
|
14597
14639
|
civilCertificateBook: ((_9 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _9 === void 0 ? void 0 : _9.civilCertificateBook) || "",
|
|
@@ -14599,7 +14641,7 @@ function mapFormToDependentSave(ef, employeeId, dependentId, personId, dateForma
|
|
|
14599
14641
|
civilCertificateNotaryOffice: ((_11 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _11 === void 0 ? void 0 : _11.civilCertificateNotaryOffice) || "",
|
|
14600
14642
|
civilCertificateStateId: ((_13 = (_12 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _12 === void 0 ? void 0 : _12.civilCertificateStateId) === null || _13 === void 0 ? void 0 : _13.id) || ((_15 = (_14 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _14 === void 0 ? void 0 : _14.civilCertificateStateId) === null || _15 === void 0 ? void 0 : _15.key) || null,
|
|
14601
14643
|
deathCertificateIssueDate: ((_16 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _16 === void 0 ? void 0 : _16.deathCertificateIssueDate) ?
|
|
14602
|
-
moment$
|
|
14644
|
+
moment$q(validateDate((_17 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _17 === void 0 ? void 0 : _17.deathCertificateIssueDate, dateFormat)).format(dateFormatToSave) : null,
|
|
14603
14645
|
deathCertificateRegisterNumber: ((_18 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _18 === void 0 ? void 0 : _18.deathCertificateRegisterNumber) || "",
|
|
14604
14646
|
deathCertificateNumber: ((_19 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _19 === void 0 ? void 0 : _19.deathCertificateNumber) || ""
|
|
14605
14647
|
};
|
|
@@ -14622,7 +14664,7 @@ function mapPersonRetrieveToEmployeeDependentForm(data, employeeId, dateFormat)
|
|
|
14622
14664
|
fullName: personRetrieve.basicData.fullName,
|
|
14623
14665
|
nickname: personRetrieve.basicData.nickname || null,
|
|
14624
14666
|
genderType: personRetrieve.basicData.genderType,
|
|
14625
|
-
birthDate: ((_a = personRetrieve.basicData) === null || _a === void 0 ? void 0 : _a.birthDate) && moment$
|
|
14667
|
+
birthDate: ((_a = personRetrieve.basicData) === null || _a === void 0 ? void 0 : _a.birthDate) && moment$q((_b = personRetrieve.basicData) === null || _b === void 0 ? void 0 : _b.birthDate).format(dateFormat),
|
|
14626
14668
|
email: Array.isArray((_c = personRetrieve.emailData) === null || _c === void 0 ? void 0 : _c.email) ?
|
|
14627
14669
|
personRetrieve.emailData.email.join(", ") : ((_d = personRetrieve.emailData) === null || _d === void 0 ? void 0 : _d.email) || null,
|
|
14628
14670
|
};
|
|
@@ -14643,16 +14685,16 @@ function mapPersonRetrieveToEmployeeDependentForm(data, employeeId, dateFormat)
|
|
|
14643
14685
|
rgNumber: ((_u = personRetrieve.nationalityData) === null || _u === void 0 ? void 0 : _u.rgNumber) || null,
|
|
14644
14686
|
rgIssuer: ((_v = personRetrieve.nationalityData) === null || _v === void 0 ? void 0 : _v.rgIssuer) || null,
|
|
14645
14687
|
rgIssuerStateId: ((_w = personRetrieve.nationalityData) === null || _w === void 0 ? void 0 : _w.rgIssuerState) ? Object.assign(Object.assign({}, (_y = (_x = personRetrieve.nationalityData) === null || _x === void 0 ? void 0 : _x.rgIssuerState) === null || _y === void 0 ? void 0 : _y.value), { id: (_0 = (_z = personRetrieve.nationalityData) === null || _z === void 0 ? void 0 : _z.rgIssuerState) === null || _0 === void 0 ? void 0 : _0.key, label: (_2 = (_1 = personRetrieve.nationalityData) === null || _1 === void 0 ? void 0 : _1.rgIssuerState) === null || _2 === void 0 ? void 0 : _2.value }) : {},
|
|
14646
|
-
rgIssueDate: ((_3 = personRetrieve.nationalityData) === null || _3 === void 0 ? void 0 : _3.rgIssueDate) && moment$
|
|
14688
|
+
rgIssueDate: ((_3 = personRetrieve.nationalityData) === null || _3 === void 0 ? void 0 : _3.rgIssueDate) && moment$q((_4 = personRetrieve.nationalityData) === null || _4 === void 0 ? void 0 : _4.rgIssueDate).format("L"),
|
|
14647
14689
|
civilCertificateType: ((_5 = personRetrieve.additionalData) === null || _5 === void 0 ? void 0 : _5.civilCertificateType) || "",
|
|
14648
|
-
civilCertificateIssueDate: ((_6 = personRetrieve.additionalData) === null || _6 === void 0 ? void 0 : _6.civilCertificateIssueDate) && moment$
|
|
14690
|
+
civilCertificateIssueDate: ((_6 = personRetrieve.additionalData) === null || _6 === void 0 ? void 0 : _6.civilCertificateIssueDate) && moment$q((_7 = personRetrieve.additionalData) === null || _7 === void 0 ? void 0 : _7.civilCertificateIssueDate).format("L"),
|
|
14649
14691
|
civilCertificateRegisterNumber: ((_8 = personRetrieve.additionalData) === null || _8 === void 0 ? void 0 : _8.civilCertificateRegisterNumber) || "",
|
|
14650
14692
|
civilCertificateTerm: ((_9 = personRetrieve.additionalData) === null || _9 === void 0 ? void 0 : _9.civilCertificateTerm) || "",
|
|
14651
14693
|
civilCertificateBook: ((_10 = personRetrieve.additionalData) === null || _10 === void 0 ? void 0 : _10.civilCertificateBook) || "",
|
|
14652
14694
|
civilCertificatePage: ((_11 = personRetrieve.additionalData) === null || _11 === void 0 ? void 0 : _11.civilCertificatePage) || "",
|
|
14653
14695
|
civilCertificateNotaryOffice: ((_12 = personRetrieve.additionalData) === null || _12 === void 0 ? void 0 : _12.civilCertificateNotaryOffice) || "",
|
|
14654
14696
|
civilCertificateStateId: ((_13 = personRetrieve.additionalData) === null || _13 === void 0 ? void 0 : _13.civilCertificateState) ? Object.assign(Object.assign({}, (_14 = personRetrieve.additionalData) === null || _14 === void 0 ? void 0 : _14.civilCertificateState), { id: (_16 = (_15 = personRetrieve.additionalData) === null || _15 === void 0 ? void 0 : _15.civilCertificateState) === null || _16 === void 0 ? void 0 : _16.key, label: (_18 = (_17 = personRetrieve.additionalData) === null || _17 === void 0 ? void 0 : _17.civilCertificateState) === null || _18 === void 0 ? void 0 : _18.value }) : {},
|
|
14655
|
-
deathCertificateIssueDate: ((_19 = personRetrieve.additionalData) === null || _19 === void 0 ? void 0 : _19.deathCertificateIssueDate) && moment$
|
|
14697
|
+
deathCertificateIssueDate: ((_19 = personRetrieve.additionalData) === null || _19 === void 0 ? void 0 : _19.deathCertificateIssueDate) && moment$q((_20 = personRetrieve.additionalData) === null || _20 === void 0 ? void 0 : _20.deathCertificateIssueDate).format("L"),
|
|
14656
14698
|
deathCertificateRegisterNumber: ((_21 = personRetrieve.additionalData) === null || _21 === void 0 ? void 0 : _21.deathCertificateRegisterNumber) || "",
|
|
14657
14699
|
deathCertificateNumber: ((_22 = personRetrieve.additionalData) === null || _22 === void 0 ? void 0 : _22.deathCertificateNumber) || ""
|
|
14658
14700
|
};
|
|
@@ -14669,18 +14711,21 @@ function mapPersonRetrieveToEmployeeDependentForm(data, employeeId, dateFormat)
|
|
|
14669
14711
|
}
|
|
14670
14712
|
|
|
14671
14713
|
let EmployeeDependentFormComponent = class EmployeeDependentFormComponent {
|
|
14672
|
-
constructor(translateService, employeeDependentService, sUrlService, focusService, route, confirmationService, messageService) {
|
|
14714
|
+
constructor(translateService, employeeDependentService, sUrlService, focusService, dependentDraftService, route, confirmationService, messageService) {
|
|
14673
14715
|
this.translateService = translateService;
|
|
14674
14716
|
this.employeeDependentService = employeeDependentService;
|
|
14675
14717
|
this.sUrlService = sUrlService;
|
|
14676
14718
|
this.focusService = focusService;
|
|
14719
|
+
this.dependentDraftService = dependentDraftService;
|
|
14677
14720
|
this.route = route;
|
|
14678
14721
|
this.confirmationService = confirmationService;
|
|
14679
14722
|
this.messageService = messageService;
|
|
14680
14723
|
this.loading = false;
|
|
14681
14724
|
this.showSideBar = false;
|
|
14682
14725
|
this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.employee_dependent_button_next");
|
|
14683
|
-
this.formGroup = new FormGroup({
|
|
14726
|
+
this.formGroup = new FormGroup({
|
|
14727
|
+
draftId: new FormControl(null),
|
|
14728
|
+
});
|
|
14684
14729
|
this.ngUnsubscribe = new Subject();
|
|
14685
14730
|
this.createSteps();
|
|
14686
14731
|
}
|
|
@@ -14697,28 +14742,133 @@ let EmployeeDependentFormComponent = class EmployeeDependentFormComponent {
|
|
|
14697
14742
|
this.localeConfig = data.localeConfig;
|
|
14698
14743
|
this.dateFormat = DateValidator.getDateFormatFromCalendar(data.localeConfig.calendar);
|
|
14699
14744
|
}
|
|
14745
|
+
undoStep() {
|
|
14746
|
+
if (this.activeIndex === 1) {
|
|
14747
|
+
this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.employee_dependent_button_next");
|
|
14748
|
+
}
|
|
14749
|
+
else if (this.activeIndex === 0) {
|
|
14750
|
+
return;
|
|
14751
|
+
}
|
|
14752
|
+
this.activeIndex--;
|
|
14753
|
+
}
|
|
14754
|
+
nextStep() {
|
|
14755
|
+
if (this.activeIndex === 0) {
|
|
14756
|
+
const formBasicStep = this.formGroup.get("basicDependentPersonData");
|
|
14757
|
+
this.validateAllFormFields(formBasicStep);
|
|
14758
|
+
if (!formBasicStep.valid && !this.dependentId) {
|
|
14759
|
+
this.steps[1].disabled = true;
|
|
14760
|
+
return this.messageService.add({
|
|
14761
|
+
severity: "error",
|
|
14762
|
+
summary: this.translateService.instant("hcm_contract.employment_contract.error"),
|
|
14763
|
+
detail: this.translateService.instant("hcm_contract.employment_contract.admission_generic_invalid_form_group"),
|
|
14764
|
+
});
|
|
14765
|
+
}
|
|
14766
|
+
this.steps[1].disabled = false;
|
|
14767
|
+
this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.admission_employee_form_btn_step_last");
|
|
14768
|
+
this.activeIndex++;
|
|
14769
|
+
}
|
|
14770
|
+
else if (this.activeIndex === 1) {
|
|
14771
|
+
this.validateAllFormFields(this.formGroup);
|
|
14772
|
+
if (!this.formGroup.valid) {
|
|
14773
|
+
const msg = this.requiredFieldsStep1 ? this.translateService.instant("hcm_contract.employment_contract.admission_generic_invalid_form_group_step_1")
|
|
14774
|
+
: this.translateService.instant("hcm_contract.employment_contract.admission_generic_invalid_form_group");
|
|
14775
|
+
return this.messageService.add({
|
|
14776
|
+
severity: "error",
|
|
14777
|
+
summary: this.translateService.instant("hcm_contract.employment_contract.error"),
|
|
14778
|
+
detail: msg,
|
|
14779
|
+
});
|
|
14780
|
+
}
|
|
14781
|
+
if (this.dependentId) {
|
|
14782
|
+
this.onBeforeSave();
|
|
14783
|
+
}
|
|
14784
|
+
else {
|
|
14785
|
+
this.onSaveDependent();
|
|
14786
|
+
}
|
|
14787
|
+
}
|
|
14788
|
+
}
|
|
14789
|
+
isNew() {
|
|
14790
|
+
return !this.dependentId;
|
|
14791
|
+
}
|
|
14792
|
+
isNewToLabel() {
|
|
14793
|
+
return this.isNew() ? "create" : "edit";
|
|
14794
|
+
}
|
|
14795
|
+
onStepSelected(event) {
|
|
14796
|
+
if (event.index === 0) {
|
|
14797
|
+
const complementForm = this.formGroup.get("complementDependentPersonData");
|
|
14798
|
+
if (!complementForm.valid && (!this.dependentId)) {
|
|
14799
|
+
this.validateAllFormFields(complementForm);
|
|
14800
|
+
return;
|
|
14801
|
+
}
|
|
14802
|
+
this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.employee_dependent_button_next");
|
|
14803
|
+
}
|
|
14804
|
+
if (event.index === 1) {
|
|
14805
|
+
const basicForm = this.formGroup.get("basicDependentPersonData");
|
|
14806
|
+
if (!basicForm.valid && (!this.dependentId)) {
|
|
14807
|
+
this.validateAllFormFields(basicForm);
|
|
14808
|
+
return;
|
|
14809
|
+
}
|
|
14810
|
+
}
|
|
14811
|
+
this.activeIndex = event.index;
|
|
14812
|
+
}
|
|
14813
|
+
onCancel() {
|
|
14814
|
+
this.showSideBar = false;
|
|
14815
|
+
}
|
|
14816
|
+
saveDependentDraft() {
|
|
14817
|
+
validateSpecificControls(this.formGroup, [
|
|
14818
|
+
"basicDependentPersonData.fullName",
|
|
14819
|
+
"complementDependentPersonData.kinshipDependentDegreeType",
|
|
14820
|
+
]);
|
|
14821
|
+
const fullName = this.formGroup.get("basicDependentPersonData.fullName");
|
|
14822
|
+
const kinshipDependentDegreeType = this.formGroup.get("complementDependentPersonData.kinshipDependentDegreeType");
|
|
14823
|
+
if ((this.activeIndex === 0 && !fullName.valid)
|
|
14824
|
+
|| (this.activeIndex === 1 && !kinshipDependentDegreeType.valid)) {
|
|
14825
|
+
return;
|
|
14826
|
+
}
|
|
14827
|
+
else if (fullName.valid && this.activeIndex === 0) {
|
|
14828
|
+
this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.admission_employee_form_btn_step_last");
|
|
14829
|
+
return this.activeIndex++;
|
|
14830
|
+
}
|
|
14831
|
+
this.loading = true;
|
|
14832
|
+
this.getSaveObservable()
|
|
14833
|
+
.pipe(takeUntil(this.ngUnsubscribe), finalize(() => this.loading = false))
|
|
14834
|
+
.subscribe((res) => {
|
|
14835
|
+
this.formGroup.get("draftId").setValue(res === null || res === void 0 ? void 0 : res.id);
|
|
14836
|
+
this.messageService.add({
|
|
14837
|
+
severity: "success",
|
|
14838
|
+
summary: this.translateService.instant("hcm_contract.employment_contract.admission_generic_toast_success"),
|
|
14839
|
+
detail: this.translateService.instant("hcm_contract.employment_contract.admission_draft_employee_form_save_sucess"),
|
|
14840
|
+
});
|
|
14841
|
+
this.showSideBar = false;
|
|
14842
|
+
this.closeSideBar.emit(true);
|
|
14843
|
+
});
|
|
14844
|
+
}
|
|
14700
14845
|
subscribeEvents() {
|
|
14701
14846
|
this.employeeDependentService.getOpenSideBarAndStartForm()
|
|
14847
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
14702
14848
|
.subscribe((data) => {
|
|
14703
14849
|
this.activeIndex = 0;
|
|
14704
14850
|
this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.employee_dependent_button_next");
|
|
14705
14851
|
this.dependentId = data === null || data === void 0 ? void 0 : data.dependentId;
|
|
14706
14852
|
this.personId = data === null || data === void 0 ? void 0 : data.personId;
|
|
14707
14853
|
this.formGroup.reset();
|
|
14708
|
-
if (!(data === null || data === void 0 ? void 0 : data.dependentId)) {
|
|
14854
|
+
if (!(data === null || data === void 0 ? void 0 : data.dependentId) && !data.dependentDraftId) {
|
|
14709
14855
|
this.steps[1].disabled = true;
|
|
14710
14856
|
this.formGroup.enable();
|
|
14711
14857
|
if (data.personId) {
|
|
14712
14858
|
this.personRetrieveInformation();
|
|
14713
14859
|
}
|
|
14714
14860
|
}
|
|
14715
|
-
else {
|
|
14861
|
+
else if ((data === null || data === void 0 ? void 0 : data.personId) && !data.dependentDraftId) {
|
|
14716
14862
|
this.personRetrieveInformation();
|
|
14717
14863
|
this.steps[0].disabled = false;
|
|
14718
14864
|
this.steps[1].disabled = false;
|
|
14719
14865
|
}
|
|
14866
|
+
else if (data === null || data === void 0 ? void 0 : data.dependentDraftId) {
|
|
14867
|
+
this.loadDraft(data.dependentDraftId);
|
|
14868
|
+
}
|
|
14720
14869
|
this.showSideBar = true;
|
|
14721
14870
|
});
|
|
14871
|
+
this.onSaveByListDraft();
|
|
14722
14872
|
}
|
|
14723
14873
|
createSteps() {
|
|
14724
14874
|
const personalData = {
|
|
@@ -14758,13 +14908,28 @@ let EmployeeDependentFormComponent = class EmployeeDependentFormComponent {
|
|
|
14758
14908
|
.pipe(takeUntil(this.ngUnsubscribe), finalize(() => {
|
|
14759
14909
|
this.loading = false;
|
|
14760
14910
|
})).subscribe(data => {
|
|
14911
|
+
var _a;
|
|
14912
|
+
const draftId = (_a = this.formGroup.get("draftId")) === null || _a === void 0 ? void 0 : _a.value;
|
|
14761
14913
|
if (data === null || data === void 0 ? void 0 : data.id) {
|
|
14762
14914
|
this.addMessageSucess();
|
|
14763
14915
|
this.showSideBar = false;
|
|
14764
14916
|
this.closeSideBar.emit(true);
|
|
14917
|
+
if (draftId) {
|
|
14918
|
+
this.deleteDraft(draftId);
|
|
14919
|
+
}
|
|
14765
14920
|
}
|
|
14766
14921
|
});
|
|
14767
14922
|
}
|
|
14923
|
+
deleteDraft(draftId) {
|
|
14924
|
+
this.loading = true;
|
|
14925
|
+
this.dependentDraftService.delete(draftId)
|
|
14926
|
+
.pipe(takeUntil(this.ngUnsubscribe), finalize(() => {
|
|
14927
|
+
this.loading = false;
|
|
14928
|
+
}))
|
|
14929
|
+
.subscribe(() => {
|
|
14930
|
+
this.closeSideBar.emit(true);
|
|
14931
|
+
});
|
|
14932
|
+
}
|
|
14768
14933
|
addMessageSucess() {
|
|
14769
14934
|
this.messageService.add({
|
|
14770
14935
|
severity: "success",
|
|
@@ -14784,47 +14949,9 @@ let EmployeeDependentFormComponent = class EmployeeDependentFormComponent {
|
|
|
14784
14949
|
});
|
|
14785
14950
|
this.focusService.focusFirstInvalidInput();
|
|
14786
14951
|
}
|
|
14787
|
-
|
|
14788
|
-
|
|
14789
|
-
|
|
14790
|
-
}
|
|
14791
|
-
else if (this.activeIndex === 0) {
|
|
14792
|
-
return;
|
|
14793
|
-
}
|
|
14794
|
-
this.activeIndex--;
|
|
14795
|
-
}
|
|
14796
|
-
nextStep() {
|
|
14797
|
-
if (this.activeIndex === 0) {
|
|
14798
|
-
const formBasicStep = this.formGroup.get("basicDependentPersonData");
|
|
14799
|
-
this.validateAllFormFields(formBasicStep);
|
|
14800
|
-
if (!formBasicStep.valid && !this.dependentId) {
|
|
14801
|
-
this.steps[1].disabled = true;
|
|
14802
|
-
return this.messageService.add({
|
|
14803
|
-
severity: "error",
|
|
14804
|
-
summary: this.translateService.instant("hcm_contract.employment_contract.error"),
|
|
14805
|
-
detail: this.translateService.instant("hcm_contract.employment_contract.admission_generic_invalid_form_group"),
|
|
14806
|
-
});
|
|
14807
|
-
}
|
|
14808
|
-
this.steps[1].disabled = false;
|
|
14809
|
-
this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.save");
|
|
14810
|
-
this.activeIndex++;
|
|
14811
|
-
}
|
|
14812
|
-
else if (this.activeIndex === 1) {
|
|
14813
|
-
this.validateAllFormFields(this.formGroup);
|
|
14814
|
-
if (!this.formGroup.valid) {
|
|
14815
|
-
return this.messageService.add({
|
|
14816
|
-
severity: "error",
|
|
14817
|
-
summary: this.translateService.instant("hcm_contract.employment_contract.error"),
|
|
14818
|
-
detail: this.translateService.instant("hcm_contract.employment_contract.admission_generic_invalid_form_group"),
|
|
14819
|
-
});
|
|
14820
|
-
}
|
|
14821
|
-
if (this.dependentId) {
|
|
14822
|
-
this.onBeforeSave();
|
|
14823
|
-
}
|
|
14824
|
-
else {
|
|
14825
|
-
this.onSaveDependent();
|
|
14826
|
-
}
|
|
14827
|
-
}
|
|
14952
|
+
requiredFieldsStep1() {
|
|
14953
|
+
var _a, _b, _c, _d;
|
|
14954
|
+
return ((_a = this.formGroup.get("basicDependentPersonData.fullName")) === null || _a === void 0 ? void 0 : _a.value) && ((_b = this.formGroup.get("basicDependentPersonData.birthDate")) === null || _b === void 0 ? void 0 : _b.value) && ((_c = this.formGroup.get("basicDependentPersonData.genderType")) === null || _c === void 0 ? void 0 : _c.value) && ((_d = this.formGroup.get("basicDependentPersonData.cpf")) === null || _d === void 0 ? void 0 : _d.value);
|
|
14828
14955
|
}
|
|
14829
14956
|
isFormChanged(beforeData, afterData) {
|
|
14830
14957
|
if (!(beforeData === null || beforeData === void 0 ? void 0 : beforeData.personDependentData) || !afterData) {
|
|
@@ -14833,7 +14960,7 @@ let EmployeeDependentFormComponent = class EmployeeDependentFormComponent {
|
|
|
14833
14960
|
const keysToCheck = [
|
|
14834
14961
|
"basicDependentPersonData",
|
|
14835
14962
|
"complementDependentPersonData",
|
|
14836
|
-
"documentDependentPersonData"
|
|
14963
|
+
"documentDependentPersonData",
|
|
14837
14964
|
];
|
|
14838
14965
|
return keysToCheck.some(formGroup => Object.keys(beforeData.personDependentData[formGroup] || {}).some(key => {
|
|
14839
14966
|
var _a, _b, _c;
|
|
@@ -14842,33 +14969,6 @@ let EmployeeDependentFormComponent = class EmployeeDependentFormComponent {
|
|
|
14842
14969
|
return beforeValue !== afterValue;
|
|
14843
14970
|
}));
|
|
14844
14971
|
}
|
|
14845
|
-
isNew() {
|
|
14846
|
-
return !this.dependentId;
|
|
14847
|
-
}
|
|
14848
|
-
isNewToLabel() {
|
|
14849
|
-
return this.isNew() ? "create" : "edit";
|
|
14850
|
-
}
|
|
14851
|
-
onStepSelected(event) {
|
|
14852
|
-
if (event.index === 0) {
|
|
14853
|
-
const complementForm = this.formGroup.get("complementDependentPersonData");
|
|
14854
|
-
if (!complementForm.valid && (!this.dependentId)) {
|
|
14855
|
-
this.validateAllFormFields(complementForm);
|
|
14856
|
-
return;
|
|
14857
|
-
}
|
|
14858
|
-
this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.employee_dependent_button_next");
|
|
14859
|
-
}
|
|
14860
|
-
if (event.index === 1) {
|
|
14861
|
-
const basicForm = this.formGroup.get("basicDependentPersonData");
|
|
14862
|
-
if (!basicForm.valid && (!this.dependentId)) {
|
|
14863
|
-
this.validateAllFormFields(basicForm);
|
|
14864
|
-
return;
|
|
14865
|
-
}
|
|
14866
|
-
}
|
|
14867
|
-
this.activeIndex = event.index;
|
|
14868
|
-
}
|
|
14869
|
-
onCancel() {
|
|
14870
|
-
this.showSideBar = false;
|
|
14871
|
-
}
|
|
14872
14972
|
onBeforeSave() {
|
|
14873
14973
|
if (!this.formGroup.dirty || !this.isFormChanged(this.loadedDependent, this.formGroup.getRawValue())) {
|
|
14874
14974
|
return this.closeSidebarWithSuccess();
|
|
@@ -14888,12 +14988,52 @@ let EmployeeDependentFormComponent = class EmployeeDependentFormComponent {
|
|
|
14888
14988
|
this.closeSideBar.emit(true);
|
|
14889
14989
|
this.addMessageSucess();
|
|
14890
14990
|
}
|
|
14991
|
+
loadDraft(draftId) {
|
|
14992
|
+
this.loading = true;
|
|
14993
|
+
this.dependentDraftService.get(draftId)
|
|
14994
|
+
.pipe(takeUntil(this.ngUnsubscribe), finalize(() => {
|
|
14995
|
+
this.loading = false;
|
|
14996
|
+
}))
|
|
14997
|
+
.subscribe((draft) => {
|
|
14998
|
+
var _a;
|
|
14999
|
+
(_a = this.formGroup.get("draftId")) === null || _a === void 0 ? void 0 : _a.setValue(draftId);
|
|
15000
|
+
const data = DependentDraft.fromDto(draft);
|
|
15001
|
+
this.formGroup.patchValue(data);
|
|
15002
|
+
});
|
|
15003
|
+
}
|
|
15004
|
+
getSaveObservable() {
|
|
15005
|
+
var _a;
|
|
15006
|
+
const form = this.formGroup.getRawValue();
|
|
15007
|
+
const dto = DependentDraft.toDto(form, this.employeeId, this.admissionDraft);
|
|
15008
|
+
let observable;
|
|
15009
|
+
const id = (_a = this.formGroup.get("draftId")) === null || _a === void 0 ? void 0 : _a.value;
|
|
15010
|
+
if (id) {
|
|
15011
|
+
observable = this.dependentDraftService.update(id, dto);
|
|
15012
|
+
}
|
|
15013
|
+
else {
|
|
15014
|
+
observable = this.dependentDraftService.insert(dto);
|
|
15015
|
+
}
|
|
15016
|
+
return observable;
|
|
15017
|
+
}
|
|
15018
|
+
onSaveByListDraft() {
|
|
15019
|
+
this.dependentDraftService.saveDraftEvent
|
|
15020
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
15021
|
+
.subscribe((formData) => {
|
|
15022
|
+
this.loading = true;
|
|
15023
|
+
if (formData) {
|
|
15024
|
+
const data = DependentDraft.fromDto(formData);
|
|
15025
|
+
this.formGroup.patchValue(data);
|
|
15026
|
+
this.onSaveDependent();
|
|
15027
|
+
}
|
|
15028
|
+
});
|
|
15029
|
+
}
|
|
14891
15030
|
};
|
|
14892
15031
|
EmployeeDependentFormComponent.ctorParameters = () => [
|
|
14893
15032
|
{ type: TranslateService },
|
|
14894
15033
|
{ type: EmployeeDependentService },
|
|
14895
15034
|
{ type: SUrlService },
|
|
14896
15035
|
{ type: FocusService },
|
|
15036
|
+
{ type: DependentDraftService },
|
|
14897
15037
|
{ type: ActivatedRoute },
|
|
14898
15038
|
{ type: ConfirmationService },
|
|
14899
15039
|
{ type: MessageService }
|
|
@@ -14901,6 +15041,9 @@ EmployeeDependentFormComponent.ctorParameters = () => [
|
|
|
14901
15041
|
__decorate([
|
|
14902
15042
|
Input()
|
|
14903
15043
|
], EmployeeDependentFormComponent.prototype, "employeeId", void 0);
|
|
15044
|
+
__decorate([
|
|
15045
|
+
Input()
|
|
15046
|
+
], EmployeeDependentFormComponent.prototype, "admissionDraft", void 0);
|
|
14904
15047
|
__decorate([
|
|
14905
15048
|
Input()
|
|
14906
15049
|
], EmployeeDependentFormComponent.prototype, "closeSideBar", void 0);
|
|
@@ -14908,7 +15051,7 @@ EmployeeDependentFormComponent = __decorate([
|
|
|
14908
15051
|
Component({
|
|
14909
15052
|
// tslint:disable-next-line:component-selector
|
|
14910
15053
|
selector: "fnd-employee-dependent-form",
|
|
14911
|
-
template: "<s-sidebar [visible]=\"showSideBar\"\n (visibleChange)=\"showSideBar = !showSideBar\"\n [header]=\"'hcm_contract.employment_contract.employee_dependent_sidebar_title_' + isNewToLabel() | translate\">\n\n <s-steps [steps]=\"steps\" [activeIndex]=\"activeIndex\" (stepSelected)=\"onStepSelected($event)\"></s-steps>\n <form [formGroup]=\"formGroup\"
|
|
15054
|
+
template: "<s-loading-state [loading]=\"loading\" blockWindow=\"true\"></s-loading-state>\n<s-sidebar [visible]=\"showSideBar\"\n (visibleChange)=\"showSideBar = !showSideBar\"\n [header]=\"'hcm_contract.employment_contract.employee_dependent_sidebar_title_' + isNewToLabel() | translate\">\n\n <s-steps [steps]=\"steps\" [activeIndex]=\"activeIndex\" (stepSelected)=\"onStepSelected($event)\"></s-steps>\n <form [formGroup]=\"formGroup\" >\n <div class=\"ui-fluid\">\n <!-- Dados pessoais -->\n <fnd-employee-dependent-personal-step [hidden]=\"activeIndex !== 0\"\n [parentFormGroup]=\"formGroup\"></fnd-employee-dependent-personal-step>\n <!-- Dados complementaris -->\n <fnd-employee-dependent-complement-step [hidden]=\"activeIndex !== 1\"\n [parentFormGroup]=\"formGroup\"></fnd-employee-dependent-complement-step>\n\n </div>\n </form>\n <s-footer class=\"footer-sidebar-form-dependent\">\n <s-button (click)=\"onCancel()\" priority=\"link\" style=\"margin-right: auto\"\n [label]=\"'hcm_contract.employment_contract.cancel' | translate\"\n ></s-button>\n <div class=\"footer-end\">\n <s-button priority=\"secondary\"\n *ngIf=\"activeIndex !== 0\"\n iconClass=\"fa fa-arrow-left\"\n (onClick)=\"undoStep()\"\n [disabled]=\"activeIndex === 0\"\n [label]=\"'hcm_contract.employment_contract.employee_dependent_button_back' | translate\">\n </s-button>\n <s-button id=\"btn-draft\"\n label=\"{{ 'hcm_contract.employment_contract.btn_dependent_save_draft' | translate }}\"\n priority=\"secondary\"(click)=\"saveDependentDraft()\" [auxiliary]=\"false\"\n [disabled]=\"loading\"></s-button>\n <s-button\n class=\"btn-next\"\n [rightIconClass]=\"!activeIndex ? 'fa fa-arrow-right' : ''\"\n (onClick)=\"nextStep()\"\n [disabled]=\"loading\"\n [label]=\"this.buttonLabel\">\n </s-button>\n </div>\n </s-footer>\n</s-sidebar>\n<p-confirmDialog key=\"edit-dependent\"></p-confirmDialog>\n",
|
|
14912
15055
|
styles: [".tab-view-full{width:100%}.toggle-header-fieldset{display:flex!important;justify-content:space-between!important;align-items:center!important}.toggle-header-fieldset .ui-inputgroup span{margin-right:8px!important;font-size:14px;font-weight:400;line-height:21px;text-align:left;text-underline-position:from-font;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}.footer-sidebar-form-dependent{display:flex;justify-content:space-between}.message-warn-admisison{padding-left:65px;font-size:14px}.message-warn-admisison p:first-of-type{font-weight:700}.btn-next>button{display:flex!important;flex-direction:row-reverse!important}.btn-next>button span{margin-left:5px!important}"]
|
|
14913
15056
|
})
|
|
14914
15057
|
], EmployeeDependentFormComponent);
|
|
@@ -14919,7 +15062,7 @@ var EnumTipSex;
|
|
|
14919
15062
|
EnumTipSex["VM"] = "VM";
|
|
14920
15063
|
})(EnumTipSex || (EnumTipSex = {}));
|
|
14921
15064
|
|
|
14922
|
-
const moment$n = moment$
|
|
15065
|
+
const moment$n = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
14923
15066
|
let EmployeeDependentPersonalStepComponent = class EmployeeDependentPersonalStepComponent {
|
|
14924
15067
|
constructor(translateService, route, formBuilder, service) {
|
|
14925
15068
|
this.translateService = translateService;
|
|
@@ -15004,7 +15147,212 @@ EmployeeDependentPersonalStepComponent = __decorate([
|
|
|
15004
15147
|
})
|
|
15005
15148
|
], EmployeeDependentPersonalStepComponent);
|
|
15006
15149
|
|
|
15007
|
-
const moment$o = moment$
|
|
15150
|
+
const moment$o = moment$q;
|
|
15151
|
+
let DependentListDraftComponent = class DependentListDraftComponent {
|
|
15152
|
+
constructor(activatedRoute, paginatorStorageService, dependentDraftService, translate, router, confirmationService, messageService) {
|
|
15153
|
+
this.activatedRoute = activatedRoute;
|
|
15154
|
+
this.paginatorStorageService = paginatorStorageService;
|
|
15155
|
+
this.dependentDraftService = dependentDraftService;
|
|
15156
|
+
this.translate = translate;
|
|
15157
|
+
this.router = router;
|
|
15158
|
+
this.confirmationService = confirmationService;
|
|
15159
|
+
this.messageService = messageService;
|
|
15160
|
+
this.isLoading = false;
|
|
15161
|
+
this.allPermissions = {};
|
|
15162
|
+
this.currentListParams = { page: 0, size: 10, sort: [] };
|
|
15163
|
+
this.permissions = {};
|
|
15164
|
+
this.closeSideBar = new EventEmitter();
|
|
15165
|
+
this.addButtonClicked = new EventEmitter();
|
|
15166
|
+
this.onEdit = new EventEmitter();
|
|
15167
|
+
this.ngUnsubscribe = new Subject();
|
|
15168
|
+
}
|
|
15169
|
+
ngOnInit() {
|
|
15170
|
+
this.gridColumns = this.getGridColumns();
|
|
15171
|
+
this.activatedRoute
|
|
15172
|
+
.data.pipe(takeUntil(this.ngUnsubscribe)).subscribe((data) => this.onRouteDataChange(data));
|
|
15173
|
+
this.closeSideBar
|
|
15174
|
+
.pipe(takeUntil(this.ngUnsubscribe), filter((value) => !!value))
|
|
15175
|
+
.subscribe(() => {
|
|
15176
|
+
this.updateGrid();
|
|
15177
|
+
});
|
|
15178
|
+
}
|
|
15179
|
+
ngOnDestroy() {
|
|
15180
|
+
this.ngUnsubscribe.next();
|
|
15181
|
+
this.ngUnsubscribe.complete();
|
|
15182
|
+
}
|
|
15183
|
+
onRouteDataChange(data) {
|
|
15184
|
+
var _a;
|
|
15185
|
+
this.allPermissions = data.allPermissions;
|
|
15186
|
+
this.permissions = (_a = data.allPermissions) === null || _a === void 0 ? void 0 : _a.dependentDraft;
|
|
15187
|
+
}
|
|
15188
|
+
getActions(data) {
|
|
15189
|
+
return [
|
|
15190
|
+
{
|
|
15191
|
+
id: "1",
|
|
15192
|
+
label: this.translate.instant("hcm_contract.employment_contract.admission_generic_edit"),
|
|
15193
|
+
visible: this.permissions.editar,
|
|
15194
|
+
command: () => {
|
|
15195
|
+
this.onEdit.emit(data === null || data === void 0 ? void 0 : data.id);
|
|
15196
|
+
},
|
|
15197
|
+
},
|
|
15198
|
+
{
|
|
15199
|
+
id: "2",
|
|
15200
|
+
visible: this.permissions.excluir,
|
|
15201
|
+
label: this.translate.instant("hcm_contract.employment_contract.logical_delete"),
|
|
15202
|
+
command: () => this.onDelete(data.id),
|
|
15203
|
+
},
|
|
15204
|
+
{
|
|
15205
|
+
id: "3",
|
|
15206
|
+
visible: this.permissions.incluir,
|
|
15207
|
+
label: this.translate.instant("hcm_contract.employment_contract.dependent_draft_effect_data"),
|
|
15208
|
+
command: () => {
|
|
15209
|
+
this.dependentDraftService.saveDraftEvent.next(data);
|
|
15210
|
+
},
|
|
15211
|
+
},
|
|
15212
|
+
];
|
|
15213
|
+
}
|
|
15214
|
+
onDelete(id) {
|
|
15215
|
+
this.confirmationService.confirm({
|
|
15216
|
+
header: this.translate.instant("hcm_contract.employment_contract.draft_delete_confirmation_message"),
|
|
15217
|
+
message: this.translate.instant("hcm_contract.employment_contract.admission_delete_confirmation_message"),
|
|
15218
|
+
acceptLabel: this.translate.instant("hcm_contract.employment_contract.admission_generic_yes"),
|
|
15219
|
+
rejectLabel: this.translate.instant("hcm_contract.employment_contract.admission_generic_no"),
|
|
15220
|
+
accept: () => {
|
|
15221
|
+
this.isLoading = true;
|
|
15222
|
+
this.dependentDraftService.delete(id)
|
|
15223
|
+
.pipe(takeUntil(this.ngUnsubscribe), finalize(() => {
|
|
15224
|
+
this.isLoading = false;
|
|
15225
|
+
this.resetGrid();
|
|
15226
|
+
}))
|
|
15227
|
+
.subscribe(() => {
|
|
15228
|
+
this.messageService.add({
|
|
15229
|
+
severity: "success",
|
|
15230
|
+
summary: this.translate.instant("hcm_contract.employment_contract.deleted_message_title"),
|
|
15231
|
+
detail: this.translate.instant("hcm_contract.employment_contract.deleted_message_content"),
|
|
15232
|
+
});
|
|
15233
|
+
});
|
|
15234
|
+
},
|
|
15235
|
+
});
|
|
15236
|
+
}
|
|
15237
|
+
getSortField() {
|
|
15238
|
+
return this.currentListParams.sort;
|
|
15239
|
+
}
|
|
15240
|
+
getPageSize() {
|
|
15241
|
+
return this.currentListParams.size;
|
|
15242
|
+
}
|
|
15243
|
+
getRowIndex() {
|
|
15244
|
+
return this.currentListParams.page * this.currentListParams.size;
|
|
15245
|
+
}
|
|
15246
|
+
formatDate(date) {
|
|
15247
|
+
return moment$o(date).format(this.dateFormat);
|
|
15248
|
+
}
|
|
15249
|
+
onGridChange(event) {
|
|
15250
|
+
const size = event.rows;
|
|
15251
|
+
const page = event.first / size;
|
|
15252
|
+
const sort = event.multiSortMeta;
|
|
15253
|
+
if (size !== 10 || page !== 0 || (sort === null || sort === void 0 ? void 0 : sort.length) > 0) {
|
|
15254
|
+
this.paginatorStorageService.storePaginator("DependentDraftListComponentPaginator", {
|
|
15255
|
+
page,
|
|
15256
|
+
size,
|
|
15257
|
+
sort,
|
|
15258
|
+
});
|
|
15259
|
+
}
|
|
15260
|
+
return this.updateGrid({ page, size, sort });
|
|
15261
|
+
}
|
|
15262
|
+
resetGrid(listParams) {
|
|
15263
|
+
if (listParams) {
|
|
15264
|
+
this.currentListParams = Object.assign(Object.assign({}, this.currentListParams), listParams);
|
|
15265
|
+
}
|
|
15266
|
+
this.currentListParams = Object.assign(Object.assign({}, this.currentListParams), { page: 0, sort: [] });
|
|
15267
|
+
this.table.reset();
|
|
15268
|
+
}
|
|
15269
|
+
getGridColumns() {
|
|
15270
|
+
const gridColumnsGeneral = [
|
|
15271
|
+
{
|
|
15272
|
+
field: "personName",
|
|
15273
|
+
header: this.translate.instant("hcm_contract.employment_contract.e_001_pes_nom_pes"),
|
|
15274
|
+
},
|
|
15275
|
+
{
|
|
15276
|
+
field: "kinshipDegreeType",
|
|
15277
|
+
header: this.translate.instant("hcm_contract.employment_contract.employee_dependent_list_kinship"),
|
|
15278
|
+
}
|
|
15279
|
+
];
|
|
15280
|
+
return gridColumnsGeneral;
|
|
15281
|
+
}
|
|
15282
|
+
updateGrid(listParams = {}) {
|
|
15283
|
+
if (!this._admissionDraftId && !this._employeeId) {
|
|
15284
|
+
return;
|
|
15285
|
+
}
|
|
15286
|
+
this.isLoading = true;
|
|
15287
|
+
this.currentListParams = Object.assign(Object.assign({}, this.currentListParams), listParams);
|
|
15288
|
+
const { page, size } = this.currentListParams;
|
|
15289
|
+
let { sort } = this.currentListParams;
|
|
15290
|
+
const displayFields = ["*"];
|
|
15291
|
+
const filterQuery = this._employeeId ? `(employee.id eq '${this._employeeId}')` : `(admissionDraft.id eq '${this._admissionDraftId}')`;
|
|
15292
|
+
if (!sort) {
|
|
15293
|
+
sort = [{ field: "lastModifiedDate", order: -1 }];
|
|
15294
|
+
}
|
|
15295
|
+
this.dependentDraftService
|
|
15296
|
+
.list({ page, size, sort, filterQuery, displayFields })
|
|
15297
|
+
.pipe(takeUntil(this.ngUnsubscribe), debounceTime(500), distinctUntilChanged(), finalize(() => {
|
|
15298
|
+
this.isLoading = false;
|
|
15299
|
+
}))
|
|
15300
|
+
.subscribe((list) => {
|
|
15301
|
+
this.gridData = list.contents;
|
|
15302
|
+
this.totalRecords = list.totalElements;
|
|
15303
|
+
});
|
|
15304
|
+
}
|
|
15305
|
+
getProp(obj, path) {
|
|
15306
|
+
return path.split(".").reduce((result, prop) => (result[prop] === undefined ? "" : result[prop]), obj);
|
|
15307
|
+
}
|
|
15308
|
+
set employeeId(id) {
|
|
15309
|
+
this._employeeId = id;
|
|
15310
|
+
if (this._employeeId) {
|
|
15311
|
+
this.updateGrid();
|
|
15312
|
+
}
|
|
15313
|
+
}
|
|
15314
|
+
set admissionDraftId(id) {
|
|
15315
|
+
this._admissionDraftId = id;
|
|
15316
|
+
if (this._admissionDraftId) {
|
|
15317
|
+
this.updateGrid();
|
|
15318
|
+
}
|
|
15319
|
+
}
|
|
15320
|
+
};
|
|
15321
|
+
DependentListDraftComponent.ctorParameters = () => [
|
|
15322
|
+
{ type: ActivatedRoute },
|
|
15323
|
+
{ type: PaginatorStorageService },
|
|
15324
|
+
{ type: DependentDraftService },
|
|
15325
|
+
{ type: TranslateService },
|
|
15326
|
+
{ type: Router },
|
|
15327
|
+
{ type: ConfirmationService },
|
|
15328
|
+
{ type: MessageService }
|
|
15329
|
+
];
|
|
15330
|
+
__decorate([
|
|
15331
|
+
Input()
|
|
15332
|
+
], DependentListDraftComponent.prototype, "closeSideBar", void 0);
|
|
15333
|
+
__decorate([
|
|
15334
|
+
Output()
|
|
15335
|
+
], DependentListDraftComponent.prototype, "addButtonClicked", void 0);
|
|
15336
|
+
__decorate([
|
|
15337
|
+
Output()
|
|
15338
|
+
], DependentListDraftComponent.prototype, "onEdit", void 0);
|
|
15339
|
+
__decorate([
|
|
15340
|
+
ViewChild("dependentDraftTable")
|
|
15341
|
+
], DependentListDraftComponent.prototype, "table", void 0);
|
|
15342
|
+
__decorate([
|
|
15343
|
+
Input()
|
|
15344
|
+
], DependentListDraftComponent.prototype, "employeeId", null);
|
|
15345
|
+
__decorate([
|
|
15346
|
+
Input()
|
|
15347
|
+
], DependentListDraftComponent.prototype, "admissionDraftId", null);
|
|
15348
|
+
DependentListDraftComponent = __decorate([
|
|
15349
|
+
Component({
|
|
15350
|
+
selector: "app-dependent-list-draft",
|
|
15351
|
+
template: "<s-loading-state [loading]=\"isLoading\" blockWindow=\"true\"></s-loading-state>\n<div class=\"ui-g\" *ngIf=\"gridData?.length\">\n <div class=\"ui-g-12\">\n <button id=\"add-button-draft\" type=\"button\" pButton\n [label]=\"'hcm_contract.employment_contract.add_employee_dependent' | translate\"\n title=\"{{'hcm_contract.employment_contract.add_employee_dependent' | translate}} (Alt + Shift + N)\"\n *ngIf=\"permissions.incluir\" (click)=\"addButtonClicked.emit()\"></button>\n </div>\n</div>\n<s-empty-state *ngIf=\"!gridData?.length\"\n [title]=\"'hcm_contract.employment_contract.employee_dependent_empty_state_title' | translate\"\n [showPrimaryAction]=\"this.permissions.incluir\"\n [primaryActionLabel]=\"'hcm_contract.employment_contract.add_employee_dependent' | translate\"\n (primaryAction)=\"addButtonClicked.emit()\"\n [description]=\"'hcm_contract.employment_contract.employee_dependent_empty_state_description' | translate\"\n>\n</s-empty-state>\n<div [attr.data-hidden]=\"!gridData?.length\">\n\n <p-table #dependentDraftTable [value]=\"gridData\" [columns]=\"gridColumns\" dataKey=\"id\" [lazy]=\"true\"\n [scrollable]=\"true\" [resizableColumns]=\"true\" sortMode=\"multiple\" [paginator]=\"true\"\n [totalRecords]=\"totalRecords\" [multiSortMeta]=\"getSortField()\" [first]=\"getRowIndex()\"\n [rows]=\"getPageSize()\" [rowsPerPageOptions]=\"[10, 20, 50, 100]\"\n (onLazyLoad)=\"onGridChange($event)\">\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\">\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th id=\"th-randon\" *ngFor=\"let col of columns\" [pSortableColumn]=\"col.field\"\n pResizableColumn>\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.header }}</span>\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\n </div>\n </th>\n <th pResizableColumn scope=\"col\" *ngIf=\"this.permissions.excluir\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{\n 'hcm_contract.employment_contract.actions' |\n translate\n }}</span>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns>\n <tr [pSelectableRow]=\"rowData\">\n <td>\n <span>{{ rowData?.personName }}</span>\n </td><td>\n <div [ngSwitch]=\"getProp(rowData, 'kinshipDegreeType') || ('hcm_contract.employment_contract.list_grid_empty_field' | translate)\">\n <span *ngSwitchCase=\"'SON'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_SON\" | translate}}</span>\n <span *ngSwitchCase=\"'SPOUSE'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_SPOUSE\" | translate}}</span>\n <span *ngSwitchCase=\"'FATHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_FATHER\" | translate}}</span>\n <span *ngSwitchCase=\"'GRANDFATHER_GRANDMOTHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_GRANDFATHER_GRANDMOTHER\" | translate}}</span>\n <span *ngSwitchCase=\"'GREAT_GRANDFATHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_GREAT_GRANDFATHER\" | translate}}</span>\n <span *ngSwitchCase=\"'NEPHEW'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_NEPHEW\" | translate}}</span>\n <span *ngSwitchCase=\"'UNCLE'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_UNCLE\" | translate}}</span>\n <span *ngSwitchCase=\"'GRANDSON'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_GRANDSON\" | translate}}</span>\n <span *ngSwitchCase=\"'FATHER_IN_LAW'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_FATHER_IN_LAW\" | translate}}</span>\n <span *ngSwitchCase=\"'SON_IN_LAW_DAOUGHTER_IN_LAW'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_SON_IN_LAW_DAOUGHTER_IN_LAW\" | translate}}</span>\n <span *ngSwitchCase=\"'STEPSON'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_STEPSON\" | translate}}</span>\n <span *ngSwitchCase=\"'BROTHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_BROTHER\" | translate}}</span>\n <span *ngSwitchCase=\"'ADOPTED_CHILD'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_ADOPTED_CHILD\" | translate}}</span>\n <span *ngSwitchCase=\"'PENSIONERS'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_PENSIONERS\" | translate}}</span>\n <span *ngSwitchCase=\"'COMPANION'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_COMPANION\" | translate}}</span>\n <span *ngSwitchCase=\"'GUARDIANSHIP'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_GUARDIANSHIP\" | translate}}</span>\n <span *ngSwitchCase=\"'MINOR_UNDER_GUARD'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_MINOR_UNDER_GUARD\" | translate}}</span>\n <span *ngSwitchCase=\"'STEPMOTHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_STEPMOTHER\" | translate}}</span>\n <span *ngSwitchCase=\"'STEPFATHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_STEPFATHER\" | translate}}</span>\n <span *ngSwitchCase=\"'TUTOR'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_TUTOR\" | translate}}</span>\n <span *ngSwitchCase=\"'EX_EXPOSED'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_EX_EXPOSED\" | translate}}</span>\n <span *ngSwitchCase=\"'GREAT_GRANDSON'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_GREAT_GRANDSON\" | translate}}</span>\n <span *ngSwitchCase=\"'EX_PARTNER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_EX_PARTNER\" | translate}}</span>\n <span *ngSwitchCase=\"'CONCUBINE'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_CONCUBINE\" | translate}}</span>\n <span *ngSwitchCase=\"'CURATORSHIP'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_CURATORSHIP\" | translate}}</span>\n <span *ngSwitchCase=\"'SOCIOAFFECTIVE'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_SOCIOAFFECTIVE\" | translate}}</span>\n <span *ngSwitchCase=\"'FATHER_MOTHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_FATHER_MOTHER\" | translate}}</span>\n <span *ngSwitchCase=\"'OTHERS'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_OTHERS\" | translate}}</span>\n <span *ngSwitchDefault>{{ \"hcm_contract.employment_contract.list_grid_empty_field\" | translate}}</span>\n </div>\n </td>\n <td class=\"txt-center\" tabindex=\"0\" *ngIf=\"this.permissions.editar && this.permissions.excluir\">\n <s-button label=\"{{'hcm_contract.employment_contract.admission_generic_actions' | translate}}\"\n priority=\"default\" [model]=\"getActions(rowData)\" [disabled]=\"false\"\n [auxiliary]=\"true\"></s-button>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span\n [translate]=\"'hcm_contract.employment_contract.total_records'\"\n [translateParams]=\"{value: totalRecords}\">\n </span>\n </ng-template>\n </p-table>\n</div>\n"
|
|
15352
|
+
})
|
|
15353
|
+
], DependentListDraftComponent);
|
|
15354
|
+
|
|
15355
|
+
const moment$p = moment$q;
|
|
15008
15356
|
let EmployeeDependentListComponent = class EmployeeDependentListComponent {
|
|
15009
15357
|
constructor(translate, fb, cdRef, focusService, paginatorStorageService, employeeDependentService, activatedRoute, confirmationService, messageService, router) {
|
|
15010
15358
|
this.translate = translate;
|
|
@@ -15034,6 +15382,9 @@ let EmployeeDependentListComponent = class EmployeeDependentListComponent {
|
|
|
15034
15382
|
this._employeeId = id;
|
|
15035
15383
|
this.updateGrid();
|
|
15036
15384
|
}
|
|
15385
|
+
set admissionDraftId(id) {
|
|
15386
|
+
this._admissionDraftId = id;
|
|
15387
|
+
}
|
|
15037
15388
|
ngAfterViewChecked() {
|
|
15038
15389
|
this.cdRef.detectChanges();
|
|
15039
15390
|
}
|
|
@@ -15148,13 +15499,13 @@ let EmployeeDependentListComponent = class EmployeeDependentListComponent {
|
|
|
15148
15499
|
return `${name} eq ${value}`;
|
|
15149
15500
|
}
|
|
15150
15501
|
else if (type === FieldType.Date) {
|
|
15151
|
-
return `${name} eq '${moment$
|
|
15502
|
+
return `${name} eq '${moment$p(value).format("YYYY-MM-DD")}'`;
|
|
15152
15503
|
}
|
|
15153
15504
|
else if (type === FieldType.Time) {
|
|
15154
|
-
return `${name} eq '${moment$
|
|
15505
|
+
return `${name} eq '${moment$p(value).format("HH:mm:ss")}'`;
|
|
15155
15506
|
}
|
|
15156
15507
|
else if (type === FieldType.DateTime) {
|
|
15157
|
-
return `${name} eq '${moment$
|
|
15508
|
+
return `${name} eq '${moment$p(value).format()}'`;
|
|
15158
15509
|
}
|
|
15159
15510
|
else if (type === FieldType.String) {
|
|
15160
15511
|
return `containing(upper(${name}), upper('${value.replace(/'/g, "\\'")}'))`;
|
|
@@ -15252,6 +15603,11 @@ let EmployeeDependentListComponent = class EmployeeDependentListComponent {
|
|
|
15252
15603
|
personId: this.personId,
|
|
15253
15604
|
});
|
|
15254
15605
|
}
|
|
15606
|
+
onEditDraft(draftId) {
|
|
15607
|
+
this.employeeDependentService.setOpenSideBarAndStartForm({
|
|
15608
|
+
dependentDraftId: draftId
|
|
15609
|
+
});
|
|
15610
|
+
}
|
|
15255
15611
|
getActions(rows) {
|
|
15256
15612
|
return [
|
|
15257
15613
|
{
|
|
@@ -15316,6 +15672,9 @@ EmployeeDependentListComponent.ctorParameters = () => [
|
|
|
15316
15672
|
__decorate([
|
|
15317
15673
|
Input()
|
|
15318
15674
|
], EmployeeDependentListComponent.prototype, "employeeId", null);
|
|
15675
|
+
__decorate([
|
|
15676
|
+
Input()
|
|
15677
|
+
], EmployeeDependentListComponent.prototype, "admissionDraftId", null);
|
|
15319
15678
|
__decorate([
|
|
15320
15679
|
ViewChild("employeeDependentTable", { static: false })
|
|
15321
15680
|
], EmployeeDependentListComponent.prototype, "table", void 0);
|
|
@@ -15323,7 +15682,7 @@ EmployeeDependentListComponent = __decorate([
|
|
|
15323
15682
|
Component({
|
|
15324
15683
|
// tslint:disable-next-line:component-selector
|
|
15325
15684
|
selector: "fnd-employee-dependent",
|
|
15326
|
-
template: "<p-panel *sLoadingState=\"loading\">\n <p-header>\n {{\"hcm_contract.employment_contract.employee_dependent_list\" | translate}}\n </p-header>\n <s-empty-state\n *ngIf=\"serverError\"\n iconClass=\"fa fa-exclamation-triangle\"\n title=\"{{'hcm_contract.employment_contract.error_server_title' | translate}}\"\n primaryActionLabel=\"{{'hcm_contract.employment_contract.error_server_try_again' | translate}}\"\n (primaryAction)=\"resetGrid()\" description=\"{{'hcm_contract.employment_contract.error_server_description' | translate}}\"></s-empty-state>\n <s-empty-state *ngIf=\"!this.gridData?.length && !serverError\" [title]=\"'hcm_contract.employment_contract.employee_dependent_empty_state_title' | translate\"\n [showPrimaryAction]=\"this.permissions.incluir\" [primaryActionLabel]=\"'hcm_contract.employment_contract.add_employee_dependent' | translate\"\n (primaryAction)=\"onAddDependent()\" [description]=\"'hcm_contract.employment_contract.employee_dependent_empty_state_description' | translate\"\n [showSecondaryAction]=\"permissions.incluir\" [showSecondaryAction]=\"hasPermissionToSeeExclusions()\"\n [secondaryActionLabel]=\"'hcm_contract.employment_contract.see_exclusions' | translate\"\n (secondaryAction)=\"openRecordExclusions()\">\n </s-empty-state>\n <div [attr.data-hidden]=\"!gridData?.length || serverError\">\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <button id=\"add-button\" type=\"button\" pButton [label]=\"'hcm_contract.employment_contract.add_employee_dependent' | translate\"\n title=\"{{'hcm_contract.employment_contract.add_employee_dependent' | translate}} (Alt + Shift + N)\"\n *ngIf=\"permissions.incluir\" (click)=\"onAddDependent()\"></button>\n <s-button id=\"other-actions-button\"\n [label]=\"'hcm_contract.employment_contract.other_actions' | translate\"\n [model]=\"getOtherActions()\"\n priority=\"secondary\"\n [disabled]=\"false\" [auxiliary]=\"false\"\n *ngIf=\"hasPermissionToSeeExclusions()\">\n </s-button>\n </div>\n </div>\n <p-table #employeeDependentTable [value]=\"gridData\" [columns]=\"gridColumns\" dataKey=\"id\" [lazy]=\"true\"\n [scrollable]=\"true\" [resizableColumns]=\"true\" sortMode=\"multiple\" [paginator]=\"true\"\n [totalRecords]=\"totalRecords\" [multiSortMeta]=\"getSortField()\" [first]=\"getRowIndex()\"\n [rows]=\"getPageSize()\" [rowsPerPageOptions]=\"[10, 20, 50, 100]\"\n (onLazyLoad)=\"onGridChange($event)\">\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\">\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngFor=\"let col of columns\" [pSortableColumn]=\"col.field\"\n pResizableColumn>\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{col.header}}</span>\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\n </div>\n </th>\n <th pResizableColumn scope=\"col\" *ngIf=\"this.permissions.excluir\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{'hcm_contract.employment_contract.actions' |\n translate}}</span>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns>\n <tr [pSelectableRow]=\"rowData\">\n <td>\n <span>{{\"\" + (getProp(rowData, 'dependent.codPes'))}}</span>\n </td>\n <td>\n <span>{{\"\" + (getProp(rowData, 'dependent.nomPes')|| ('hcm_contract.employment_contract.list_grid_empty_field' | translate))}}</span>\n </td>\n <td>\n <div [ngSwitch]=\"getProp(rowData, 'dependent.graPde') || ('hcm_contract.employment_contract.list_grid_empty_field' | translate)\">\n <span *ngSwitchCase=\"'SON'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_SON\" | translate}}</span>\n <span *ngSwitchCase=\"'SPOUSE'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_SPOUSE\" | translate}}</span>\n <span *ngSwitchCase=\"'FATHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_FATHER\" | translate}}</span>\n <span *ngSwitchCase=\"'GRANDFATHER_GRANDMOTHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_GRANDFATHER_GRANDMOTHER\" | translate}}</span>\n <span *ngSwitchCase=\"'GREAT_GRANDFATHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_GREAT_GRANDFATHER\" | translate}}</span>\n <span *ngSwitchCase=\"'NEPHEW'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_NEPHEW\" | translate}}</span>\n <span *ngSwitchCase=\"'UNCLE'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_UNCLE\" | translate}}</span>\n <span *ngSwitchCase=\"'GRANDSON'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_GRANDSON\" | translate}}</span>\n <span *ngSwitchCase=\"'FATHER_IN_LAW'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_FATHER_IN_LAW\" | translate}}</span>\n <span *ngSwitchCase=\"'SON_IN_LAW_DAOUGHTER_IN_LAW'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_SON_IN_LAW_DAOUGHTER_IN_LAW\" | translate}}</span>\n <span *ngSwitchCase=\"'STEPSON'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_STEPSON\" | translate}}</span>\n <span *ngSwitchCase=\"'BROTHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_BROTHER\" | translate}}</span>\n <span *ngSwitchCase=\"'ADOPTED_CHILD'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_ADOPTED_CHILD\" | translate}}</span>\n <span *ngSwitchCase=\"'PENSIONERS'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_PENSIONERS\" | translate}}</span>\n <span *ngSwitchCase=\"'COMPANION'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_COMPANION\" | translate}}</span>\n <span *ngSwitchCase=\"'GUARDIANSHIP'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_GUARDIANSHIP\" | translate}}</span>\n <span *ngSwitchCase=\"'MINOR_UNDER_GUARD'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_MINOR_UNDER_GUARD\" | translate}}</span>\n <span *ngSwitchCase=\"'STEPMOTHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_STEPMOTHER\" | translate}}</span>\n <span *ngSwitchCase=\"'STEPFATHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_STEPFATHER\" | translate}}</span>\n <span *ngSwitchCase=\"'TUTOR'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_TUTOR\" | translate}}</span>\n <span *ngSwitchCase=\"'EX_EXPOSED'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_EX_EXPOSED\" | translate}}</span>\n <span *ngSwitchCase=\"'GREAT_GRANDSON'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_GREAT_GRANDSON\" | translate}}</span>\n <span *ngSwitchCase=\"'EX_PARTNER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_EX_PARTNER\" | translate}}</span>\n <span *ngSwitchCase=\"'CONCUBINE'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_CONCUBINE\" | translate}}</span>\n <span *ngSwitchCase=\"'CURATORSHIP'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_CURATORSHIP\" | translate}}</span>\n <span *ngSwitchCase=\"'SOCIOAFFECTIVE'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_SOCIOAFFECTIVE\" | translate}}</span>\n <span *ngSwitchCase=\"'FATHER_MOTHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_FATHER_MOTHER\" | translate}}</span>\n <span *ngSwitchCase=\"'OTHERS'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_OTHERS\" | translate}}</span>\n <span *ngSwitchDefault>{{ \"hcm_contract.employment_contract.list_grid_empty_field\" | translate}}</span>\n </div>\n </td>\n <td>\n <span>{{\"\" + (getProp(rowData, 'dependent.intNet')|| ('hcm_contract.employment_contract.list_grid_empty_field' | translate))}}</span>\n </td>\n <td>\n <span>{{\"\" + (getProp(rowData, 'dependent.fonPes')|| ('hcm_contract.employment_contract.list_grid_empty_field' | translate))}}</span>\n </td>\n <td class=\"txt-center\" tabindex=\"0\" *ngIf=\"this.permissions.editar && this.permissions.excluir\">\n <s-button label=\"{{'hcm_contract.employment_contract.admission_generic_actions' | translate}}\"\n priority=\"default\" [model]=\"getActions(rowData)\" [disabled]=\"false\" [auxiliary]=\"true\"></s-button>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span\n [translate]=\"'hcm_contract.employment_contract.total_records'\"\n [translateParams]=\"{value: totalRecords}\">\n </span>\n </ng-template>\n </p-table>\n </div>\n</p-panel>\n<p-dialog header=\"{{ 'hcm_contract.employment_contract.employee_dependent_register_method_title' | translate }}\"\n[draggable]=\"false\" [modal]=\"true\"\n[(visible)]=\"showDialog\" [closable]=\"false\">\n <form class=\"ui-fluid\" [formGroup]=\"formGroup\">\n <div class=\"radio-buttons required ui-lg-12\" style=\"margin-bottom: 20px;\">\n <label id=\"registerMethod\">{{ 'hcm_contract.employment_contract.employee_dependent_register_method_label' | translate }}</label>\n <div><p-radioButton name=\"registerMethod\" formControlName=\"registerMethod\"\n value=\"newRegister\"\n label=\"{{ 'hcm_contract.employment_contract.employee_dependent_register_method_create_data' | translate}}\"></p-radioButton></div>\n <div><p-radioButton\n name=\"registerMethod\" formControlName=\"registerMethod\"\n value=\"existing\"\n label=\"{{ 'hcm_contract.employment_contract.employee_dependent_register_method_existing_data' | translate}}\"></p-radioButton></div>\n <s-control-errors\n id=\"er-registerMethod\"\n [control]=\"formGroup.get('registerMethod')\"\n [errorMessages]=\"{\n required: 'hcm_contract.employment_contract.admission_generic_field_validator_required' | translate\n }\"\n ></s-control-errors>\n </div>\n\n <div class=\"ui-lg-12\">\n <div class=\"person-label\">\n <label for=\"person\">{{'hcm_contract.employment_contract.data_person_id_lookup_title' | translate}}</label>\n <span\n class=\"fa fa-info-circle\"\n [pTooltip]=\"'hcm_contract.employment_contract.employee_dependent_tooltip_person' | translate\">\n </span>\n </div>\n <div class=\"{{personClass}}\">\n <fnd-person-lookup [formGroup]=\"formGroup\" [locale]=\"localeConfig\"></fnd-person-lookup>\n <s-control-errors\n id=\"er-person\"\n [control]=\"formGroup.get('person')\"\n [errorMessages]=\"{\n required: 'hcm_contract.employment_contract.admission_generic_field_validator_required' | translate\n }\"\n ></s-control-errors>\n </div>\n </div>\n </form>\n <p-footer>\n <s-button\n [label]=\"'hcm_contract.employment_contract.employee_dependent_next' | translate\"\n priority=\"primary\" (onClick)=\"sendToForm()\">\n </s-button>\n <s-button\n [label]=\"'hcm_contract.employment_contract.cancel' | translate\"\n priority=\"secondary\"\n (onClick)=\"onCancel()\">\n </s-button>\n </p-footer>\n</p-dialog>\n<p-confirmDialog></p-confirmDialog>\n<fnd-employee-dependent-form [employeeId]=\"_employeeId\" [closeSideBar]=\"closeSideBar\"></fnd-employee-dependent-form>\n<s-exclusion-details></s-exclusion-details>",
|
|
15685
|
+
template: "<p-panel *sLoadingState=\"loading\">\n <p-tabView styleClass=\"form-group\" *sLoadingState=\"loading\" >\n <p-tabPanel *ngIf=\"!_admissionDraftId\"\n [header]=\"'hcm_contract.employment_contract.employee_dependent_title_header' | translate\">\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <button id=\"add-button\" type=\"button\" pButton [label]=\"'hcm_contract.employment_contract.add_employee_dependent' | translate\"\n title=\"{{'hcm_contract.employment_contract.add_employee_dependent' | translate}} (Alt + Shift + N)\"\n *ngIf=\"permissions.incluir\" (click)=\"onAddDependent()\"></button>\n <s-button id=\"other-actions-button\"\n [label]=\"'hcm_contract.employment_contract.other_actions' | translate\"\n [model]=\"getOtherActions()\"\n priority=\"secondary\"\n [disabled]=\"false\" [auxiliary]=\"false\"\n *ngIf=\"hasPermissionToSeeExclusions()\">\n </s-button>\n </div>\n </div>\n <s-empty-state *ngIf=\"!this.gridData?.length && !serverError\" [title]=\"'hcm_contract.employment_contract.employee_dependent_empty_state_title' | translate\"\n [showPrimaryAction]=\"this.permissions.incluir\" [primaryActionLabel]=\"'hcm_contract.employment_contract.add_employee_dependent' | translate\"\n (primaryAction)=\"onAddDependent()\" [description]=\"'hcm_contract.employment_contract.employee_dependent_empty_state_description' | translate\"\n [showSecondaryAction]=\"permissions.incluir\" [showSecondaryAction]=\"hasPermissionToSeeExclusions()\"\n [secondaryActionLabel]=\"'hcm_contract.employment_contract.see_exclusions' | translate\"\n (secondaryAction)=\"openRecordExclusions()\">\n </s-empty-state>\n <div [attr.data-hidden]=\"!gridData?.length || serverError\">\n\n <p-table #employeeDependentTable [value]=\"gridData\" [columns]=\"gridColumns\" dataKey=\"id\" [lazy]=\"true\"\n [scrollable]=\"true\" [resizableColumns]=\"true\" sortMode=\"multiple\" [paginator]=\"true\"\n [totalRecords]=\"totalRecords\" [multiSortMeta]=\"getSortField()\" [first]=\"getRowIndex()\"\n [rows]=\"getPageSize()\" [rowsPerPageOptions]=\"[10, 20, 50, 100]\"\n (onLazyLoad)=\"onGridChange($event)\">\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\">\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngFor=\"let col of columns\" [pSortableColumn]=\"col.field\"\n pResizableColumn>\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{col.header}}</span>\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\n </div>\n </th>\n <th pResizableColumn scope=\"col\" *ngIf=\"this.permissions.excluir\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{'hcm_contract.employment_contract.actions' |\n translate}}</span>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns>\n <tr [pSelectableRow]=\"rowData\">\n <td>\n <span>{{\"\" + (getProp(rowData, 'dependent.codPes'))}}</span>\n </td>\n <td>\n <span>{{\"\" + (getProp(rowData, 'dependent.nomPes')|| ('hcm_contract.employment_contract.list_grid_empty_field' | translate))}}</span>\n </td>\n <td>\n <div [ngSwitch]=\"getProp(rowData, 'dependent.graPde') || ('hcm_contract.employment_contract.list_grid_empty_field' | translate)\">\n <span *ngSwitchCase=\"'SON'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_SON\" | translate}}</span>\n <span *ngSwitchCase=\"'SPOUSE'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_SPOUSE\" | translate}}</span>\n <span *ngSwitchCase=\"'FATHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_FATHER\" | translate}}</span>\n <span *ngSwitchCase=\"'GRANDFATHER_GRANDMOTHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_GRANDFATHER_GRANDMOTHER\" | translate}}</span>\n <span *ngSwitchCase=\"'GREAT_GRANDFATHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_GREAT_GRANDFATHER\" | translate}}</span>\n <span *ngSwitchCase=\"'NEPHEW'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_NEPHEW\" | translate}}</span>\n <span *ngSwitchCase=\"'UNCLE'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_UNCLE\" | translate}}</span>\n <span *ngSwitchCase=\"'GRANDSON'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_GRANDSON\" | translate}}</span>\n <span *ngSwitchCase=\"'FATHER_IN_LAW'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_FATHER_IN_LAW\" | translate}}</span>\n <span *ngSwitchCase=\"'SON_IN_LAW_DAOUGHTER_IN_LAW'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_SON_IN_LAW_DAOUGHTER_IN_LAW\" | translate}}</span>\n <span *ngSwitchCase=\"'STEPSON'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_STEPSON\" | translate}}</span>\n <span *ngSwitchCase=\"'BROTHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_BROTHER\" | translate}}</span>\n <span *ngSwitchCase=\"'ADOPTED_CHILD'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_ADOPTED_CHILD\" | translate}}</span>\n <span *ngSwitchCase=\"'PENSIONERS'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_PENSIONERS\" | translate}}</span>\n <span *ngSwitchCase=\"'COMPANION'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_COMPANION\" | translate}}</span>\n <span *ngSwitchCase=\"'GUARDIANSHIP'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_GUARDIANSHIP\" | translate}}</span>\n <span *ngSwitchCase=\"'MINOR_UNDER_GUARD'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_MINOR_UNDER_GUARD\" | translate}}</span>\n <span *ngSwitchCase=\"'STEPMOTHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_STEPMOTHER\" | translate}}</span>\n <span *ngSwitchCase=\"'STEPFATHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_STEPFATHER\" | translate}}</span>\n <span *ngSwitchCase=\"'TUTOR'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_TUTOR\" | translate}}</span>\n <span *ngSwitchCase=\"'EX_EXPOSED'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_EX_EXPOSED\" | translate}}</span>\n <span *ngSwitchCase=\"'GREAT_GRANDSON'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_GREAT_GRANDSON\" | translate}}</span>\n <span *ngSwitchCase=\"'EX_PARTNER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_EX_PARTNER\" | translate}}</span>\n <span *ngSwitchCase=\"'CONCUBINE'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_CONCUBINE\" | translate}}</span>\n <span *ngSwitchCase=\"'CURATORSHIP'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_CURATORSHIP\" | translate}}</span>\n <span *ngSwitchCase=\"'SOCIOAFFECTIVE'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_SOCIOAFFECTIVE\" | translate}}</span>\n <span *ngSwitchCase=\"'FATHER_MOTHER'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_FATHER_MOTHER\" | translate}}</span>\n <span *ngSwitchCase=\"'OTHERS'\">{{ \"hcm_contract.employment_contract.employee_dependent_kinship_degree_OTHERS\" | translate}}</span>\n <span *ngSwitchDefault>{{ \"hcm_contract.employment_contract.list_grid_empty_field\" | translate}}</span>\n </div>\n </td>\n <td>\n <span>{{\"\" + (getProp(rowData, 'dependent.intNet')|| ('hcm_contract.employment_contract.list_grid_empty_field' | translate))}}</span>\n </td>\n <td>\n <span>{{\"\" + (getProp(rowData, 'dependent.fonPes')|| ('hcm_contract.employment_contract.list_grid_empty_field' | translate))}}</span>\n </td>\n <td class=\"txt-center\" tabindex=\"0\" *ngIf=\"this.permissions.editar && this.permissions.excluir\">\n <s-button label=\"{{'hcm_contract.employment_contract.admission_generic_actions' | translate}}\"\n priority=\"default\" [model]=\"getActions(rowData)\" [disabled]=\"false\" [auxiliary]=\"true\"></s-button>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span\n [translate]=\"'hcm_contract.employment_contract.total_records'\"\n [translateParams]=\"{value: totalRecords}\">\n </span>\n </ng-template>\n </p-table>\n </div>\n </p-tabPanel>\n <p-tabPanel\n [header]=\"'hcm_contract.employment_contract.employee_dependent_draft_title_header' | translate\">\n <app-dependent-list-draft\n (addButtonClicked)=\"onAddDependent()\"\n [employeeId]=\"_employeeId\"\n [closeSideBar]=\"closeSideBar\"\n [admissionDraftId]=\"_admissionDraftId\"\n (onEdit)=\"onEditDraft($event)\">\n </app-dependent-list-draft>\n </p-tabPanel>\n </p-tabView>\n</p-panel>\n<p-dialog header=\"{{ 'hcm_contract.employment_contract.employee_dependent_register_method_title' | translate }}\"\n[draggable]=\"false\" [modal]=\"true\"\n[(visible)]=\"showDialog\" [closable]=\"false\">\n <form class=\"ui-fluid\" [formGroup]=\"formGroup\">\n <div class=\"radio-buttons required ui-lg-12\" style=\"margin-bottom: 20px;\">\n <label id=\"registerMethod\">{{ 'hcm_contract.employment_contract.employee_dependent_register_method_label' | translate }}</label>\n <div><p-radioButton name=\"registerMethod\" formControlName=\"registerMethod\"\n value=\"newRegister\"\n label=\"{{ 'hcm_contract.employment_contract.employee_dependent_register_method_create_data' | translate}}\"></p-radioButton></div>\n <div><p-radioButton\n name=\"registerMethod\" formControlName=\"registerMethod\"\n value=\"existing\"\n label=\"{{ 'hcm_contract.employment_contract.employee_dependent_register_method_existing_data' | translate}}\"></p-radioButton></div>\n <s-control-errors\n id=\"er-registerMethod\"\n [control]=\"formGroup.get('registerMethod')\"\n [errorMessages]=\"{\n required: 'hcm_contract.employment_contract.admission_generic_field_validator_required' | translate\n }\"\n ></s-control-errors>\n </div>\n\n <div class=\"ui-lg-12\">\n <div class=\"person-label\">\n <label for=\"personLabel\">{{'hcm_contract.employment_contract.data_person_id_lookup_title' | translate}}</label>\n <span\n id=\"personLabel\"\n class=\"fa fa-info-circle\"\n [pTooltip]=\"'hcm_contract.employment_contract.employee_dependent_tooltip_person' | translate\">\n </span>\n </div>\n <div class=\"{{personClass}}\">\n <fnd-person-lookup [formGroup]=\"formGroup\" [locale]=\"localeConfig\"></fnd-person-lookup>\n <s-control-errors\n id=\"er-person\"\n [control]=\"formGroup.get('person')\"\n [errorMessages]=\"{\n required: 'hcm_contract.employment_contract.admission_generic_field_validator_required' | translate\n }\"\n ></s-control-errors>\n </div>\n </div>\n </form>\n <p-footer>\n <s-button\n [label]=\"'hcm_contract.employment_contract.employee_dependent_next' | translate\"\n priority=\"primary\" (onClick)=\"sendToForm()\">\n </s-button>\n <s-button\n [label]=\"'hcm_contract.employment_contract.cancel' | translate\"\n priority=\"secondary\"\n (onClick)=\"onCancel()\">\n </s-button>\n </p-footer>\n</p-dialog>\n<p-confirmDialog></p-confirmDialog>\n<fnd-employee-dependent-form [employeeId]=\"_employeeId\" [admissionDraft]=\"_admissionDraftId\" [closeSideBar]=\"closeSideBar\"></fnd-employee-dependent-form>\n<s-exclusion-details></s-exclusion-details>\n",
|
|
15327
15686
|
styles: [".radio-buttons{display:flex;flex-direction:column;gap:6px}.person-label{display:flex;gap:5px;align-items:center}"]
|
|
15328
15687
|
})
|
|
15329
15688
|
], EmployeeDependentListComponent);
|
|
@@ -15353,10 +15712,18 @@ EmployeeDependentModule = __decorate([
|
|
|
15353
15712
|
domain: "hcm_contract",
|
|
15354
15713
|
service: "employment_contract",
|
|
15355
15714
|
}),
|
|
15715
|
+
PermissionsModule.forChild([
|
|
15716
|
+
{
|
|
15717
|
+
name: "dependentDraft",
|
|
15718
|
+
actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
|
|
15719
|
+
uri: `res://senior.com.br/hcm_contract/employment_contract/entities/dependentDraft`,
|
|
15720
|
+
},
|
|
15721
|
+
]),
|
|
15356
15722
|
TooltipModule,
|
|
15357
15723
|
],
|
|
15358
15724
|
declarations: [
|
|
15359
15725
|
EmployeeDependentListComponent,
|
|
15726
|
+
DependentListDraftComponent,
|
|
15360
15727
|
EmployeeDependentFormComponent,
|
|
15361
15728
|
EmployeeDependentPersonalStepComponent,
|
|
15362
15729
|
EmployeeDependentComplementStepComponent,
|
|
@@ -15365,7 +15732,8 @@ EmployeeDependentModule = __decorate([
|
|
|
15365
15732
|
],
|
|
15366
15733
|
providers: [
|
|
15367
15734
|
CountryService,
|
|
15368
|
-
StateService
|
|
15735
|
+
StateService,
|
|
15736
|
+
DependentDraftService
|
|
15369
15737
|
],
|
|
15370
15738
|
exports: [
|
|
15371
15739
|
EmployeeDependentListComponent,
|
|
@@ -15381,5 +15749,5 @@ EmployeeDependentModule = __decorate([
|
|
|
15381
15749
|
* Generated bundle index. Do not edit.
|
|
15382
15750
|
*/
|
|
15383
15751
|
|
|
15384
|
-
export { AnnotationHistory, AnnotationHistoryAttachmentService, AnnotationHistoryFeatureModule, AnnotationHistoryFormComponent, AnnotationHistoryListComponent, AnnotationHistoryService, AnnotationType, AnnotationTypeService, BankAccountHistory, BankAccountHistoryService, BankAccountItemComponent, BankAccountItemModule, BankAccountListComponent, BankAccountType, BaseCollectiveHistoryComponent, BaseCollectiveHistoryModule, BaseHistoryComponent, BaseHistoryModule, BaseHistoryService, CollectiveHistoryFiltersComponent, CollectiveHistoryFiltersModule, CollectiveHistoryFiltersService, CollectiveProcessType, CompanyLookupService, ContractType, CoreHistoryModule, DateValidator, Disease, DiseaseService, DiseaseSubgroup, DiseaseSubgroupService, E001Pes, E001PesService, E030Age, E030AgeService, E030Ban, E030BanService, ESocialReason, ESocialReasonService, ESocialReasonType, ESocialWorkingHoursType, Employee, EmployeeDependentListComponent, EmployeeDependentModule, EmployeeLookupService, EmployeeService, EmployeeSummaryComponent, EmployeeSummaryModule, ErrorPageService, FieldCustomizationService, FileValidation, FiltersStorageService, FocusService, JourneyFlexibilizationService, LeaveHistory, LeaveHistoryAttachmentService, LeaveHistoryBFFService, LeaveHistoryFeatureModule, LeaveHistoryFormComponent, LeaveHistoryListComponent, LeaveHistoryService, MinutesToTimeConversionService, MinutesToTimeConversionServiceImpl, OnusRemuneration, PaginatorStorageService, PermissionService, PlatformService, ProcessType, RegulatoryNormTrainingHistory, RegulatoryNormTrainingHistoryItemComponent, RegulatoryNormTrainingHistoryItemModule, RegulatoryNormTrainingHistoryListComponent, RegulatoryNormTrainingHistoryService, Situation, SituationService, SituationType, SourceReasonChange, StorageService, WorkAccidentType, Workshift, WorkshiftGroup, WorkshiftGroupService, WorkshiftHistory, WorkshiftHistoryAdjustmentService, WorkshiftHistoryFeatureModule, WorkshiftHistoryFormComponent, WorkshiftHistoryListComponent, WorkshiftHistoryService, WorkshiftInformationHistoryService, WorkshiftService, WorkshiftType, clearValues, configEnabledFields, contractTypeOptions, convertBooleanString, convertMinutesToTime, convertTimeToMinutes, createEnumFilterString, createFilterString, createFilterTokens, createLookupRequestFilter,
|
|
15752
|
+
export { AnnotationHistory, AnnotationHistoryAttachmentService, AnnotationHistoryFeatureModule, AnnotationHistoryFormComponent, AnnotationHistoryListComponent, AnnotationHistoryService, AnnotationType, AnnotationTypeService, BankAccountHistory, BankAccountHistoryService, BankAccountItemComponent, BankAccountItemModule, BankAccountListComponent, BankAccountType, BaseCollectiveHistoryComponent, BaseCollectiveHistoryModule, BaseHistoryComponent, BaseHistoryModule, BaseHistoryService, CollectiveHistoryFiltersComponent, CollectiveHistoryFiltersModule, CollectiveHistoryFiltersService, CollectiveProcessType, CompanyLookupService, ContractType, CoreHistoryModule, DateValidator, Disease, DiseaseService, DiseaseSubgroup, DiseaseSubgroupService, E001Pes, E001PesService, E030Age, E030AgeService, E030Ban, E030BanService, ESocialReason, ESocialReasonService, ESocialReasonType, ESocialWorkingHoursType, Employee, EmployeeDependentListComponent, EmployeeDependentModule, EmployeeLookupService, EmployeeService, EmployeeSummaryComponent, EmployeeSummaryModule, ErrorPageService, FieldCustomizationService, FileValidation, FiltersStorageService, FocusService, JourneyFlexibilizationService, LeaveHistory, LeaveHistoryAttachmentService, LeaveHistoryBFFService, LeaveHistoryFeatureModule, LeaveHistoryFormComponent, LeaveHistoryListComponent, LeaveHistoryService, MinutesToTimeConversionService, MinutesToTimeConversionServiceImpl, OnusRemuneration, PaginatorStorageService, PermissionService, PlatformService, ProcessType, RegulatoryNormTrainingHistory, RegulatoryNormTrainingHistoryItemComponent, RegulatoryNormTrainingHistoryItemModule, RegulatoryNormTrainingHistoryListComponent, RegulatoryNormTrainingHistoryService, Situation, SituationService, SituationType, SourceReasonChange, StorageService, WorkAccidentType, Workshift, WorkshiftGroup, WorkshiftGroupService, WorkshiftHistory, WorkshiftHistoryAdjustmentService, WorkshiftHistoryFeatureModule, WorkshiftHistoryFormComponent, WorkshiftHistoryListComponent, WorkshiftHistoryService, WorkshiftInformationHistoryService, WorkshiftService, WorkshiftType, clearValues, configEnabledFields, contractTypeOptions, convertBooleanString, convertMinutesToTime, convertTimeToMinutes, createEnumFilterString, createFilterString, createFilterTokens, createLookupRequestFilter, getDefaultHistoryGridColumns, getEnumQuery, getEnumTextSearchQuery, getLabelValueRequest, getProp, getRecordLabel, getSituationFilterInHistorics, getSuggestionValue, getTypeInformation, getYears, isObject, isValid, isValidFilter, mergeDateTime, mergeUnique, removeCharacteresSpecials, removeErrorFromField, setDisableField, setErrors, setRequired, setRequiredFields, setValidator, setValidatorsAndDisableFields, situationOptions, startDateIsBeforeEndDateValidator, startDateIsBeforeOrEqualToEndDateValidator, startDateTimeIsBeforeEndDateTimeValidator, toastTimeToLive, updateSingleControl, validateSpecificControls, verifyValidationsForm, ɵ0, EmployeeModule as ɵa, EntityService as ɵb, E070EmpService as ɵba, E070FilService as ɵbb, ClockingEventModule as ɵbc, EmployeeSummaryService as ɵbd, DependentListDraftComponent as ɵbe, DependentDraftService as ɵbf, EmployeeDependentFormComponent as ɵbg, EmployeeDependentPersonalStepComponent as ɵbh, EmployeeDependentComplementStepComponent as ɵbi, EmployeeDependentComplementTabComponent as ɵbj, CountryService as ɵbk, EmployeeDependentDocumentTabComponent as ɵbl, StateService as ɵbm, E001PesModule as ɵc, WorkshiftGroupModule as ɵd, WorkshiftModule as ɵe, WorkshiftHistoryModule as ɵf, AnnotationTypeModule as ɵg, AnnotationHistoryModule as ɵh, BankAccountHistoryModule as ɵi, LeaveHistoryModule as ɵj, DiseaseModule as ɵk, DiseaseSubgroupModule as ɵl, ESocialReasonModule as ɵm, SituationModule as ɵn, LeaveHistoryAttachmentModule as ɵo, AnnotationHistoryAttachmentModule as ɵp, WorkshiftHistoryAdjustmentModule as ɵq, RegulatoryNormTrainingHistoryModule as ɵr, WorkshiftInformationHistoryModule as ɵs, EmployeeDependentCoreModule as ɵt, EmployeeDependentService as ɵu, HttpService as ɵv, ExclusionProcessModule as ɵw, SharedHistoryModule as ɵx, ClockingEventTimeEvaluationGeneralService as ɵy, ClockingEventComponent as ɵz };
|
|
15385
15753
|
//# sourceMappingURL=senior-gestao-pessoas-hcm-contract-employee-history.js.map
|