@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.
Files changed (47) hide show
  1. package/bundles/senior-gestao-pessoas-hcm-contract-employee-history.umd.js +651 -251
  2. package/bundles/senior-gestao-pessoas-hcm-contract-employee-history.umd.js.map +1 -1
  3. package/bundles/senior-gestao-pessoas-hcm-contract-employee-history.umd.min.js +2 -2
  4. package/bundles/senior-gestao-pessoas-hcm-contract-employee-history.umd.min.js.map +1 -1
  5. package/core/dtos/employee-dependent-save-dto.d.ts +2 -1
  6. package/core/entities/dependent-draft/dependent-draft.d.ts +11 -0
  7. package/core/entities/dependent-draft/dependent-draft.dto.d.ts +13 -0
  8. package/core/entities/dependent-draft/dependent-draft.service.d.ts +13 -0
  9. package/esm2015/core/dtos/employee-dependent-save-dto.js +1 -1
  10. package/esm2015/core/entities/dependent-draft/dependent-draft.dto.js +1 -0
  11. package/esm2015/core/entities/dependent-draft/dependent-draft.js +56 -0
  12. package/esm2015/core/entities/dependent-draft/dependent-draft.service.js +26 -0
  13. package/esm2015/lib/employee-dependent/employee-dependent.module.js +14 -2
  14. package/esm2015/lib/employee-dependent/form/employee-dependent-form.component.js +179 -75
  15. package/esm2015/lib/employee-dependent/form/employee-dependent-personal-step/employee-dependent-personal-step.component.js +1 -1
  16. package/esm2015/lib/employee-dependent/list/draft/dependent-list-draft.component.js +216 -0
  17. package/esm2015/lib/employee-dependent/list/employee-dependent-list.component.js +13 -2
  18. package/esm2015/lib/utils/helpers.js +24 -1
  19. package/esm2015/public-api.js +1 -2
  20. package/esm2015/senior-gestao-pessoas-hcm-contract-employee-history.js +10 -8
  21. package/esm5/core/dtos/employee-dependent-save-dto.js +1 -1
  22. package/esm5/core/entities/dependent-draft/dependent-draft.dto.js +1 -0
  23. package/esm5/core/entities/dependent-draft/dependent-draft.js +61 -0
  24. package/esm5/core/entities/dependent-draft/dependent-draft.service.js +29 -0
  25. package/esm5/lib/employee-dependent/employee-dependent.module.js +14 -2
  26. package/esm5/lib/employee-dependent/form/employee-dependent-form.component.js +183 -75
  27. package/esm5/lib/employee-dependent/form/employee-dependent-personal-step/employee-dependent-personal-step.component.js +1 -1
  28. package/esm5/lib/employee-dependent/list/draft/dependent-list-draft.component.js +230 -0
  29. package/esm5/lib/employee-dependent/list/employee-dependent-list.component.js +17 -2
  30. package/esm5/lib/utils/helpers.js +24 -1
  31. package/esm5/public-api.js +1 -2
  32. package/esm5/senior-gestao-pessoas-hcm-contract-employee-history.js +10 -8
  33. package/fesm2015/senior-gestao-pessoas-hcm-contract-employee-history.js +612 -244
  34. package/fesm2015/senior-gestao-pessoas-hcm-contract-employee-history.js.map +1 -1
  35. package/fesm5/senior-gestao-pessoas-hcm-contract-employee-history.js +641 -244
  36. package/fesm5/senior-gestao-pessoas-hcm-contract-employee-history.js.map +1 -1
  37. package/lib/employee-dependent/form/employee-dependent-form.component.d.ts +16 -7
  38. package/lib/employee-dependent/list/draft/dependent-list-draft.component.d.ts +49 -0
  39. package/lib/employee-dependent/list/employee-dependent-list.component.d.ts +3 -0
  40. package/lib/utils/helpers.d.ts +11 -1
  41. package/package.json +1 -1
  42. package/public-api.d.ts +0 -1
  43. package/senior-gestao-pessoas-hcm-contract-employee-history.d.ts +9 -7
  44. package/senior-gestao-pessoas-hcm-contract-employee-history.metadata.json +1 -1
  45. package/esm2015/locale/fallback.js +0 -54
  46. package/esm5/locale/fallback.js +0 -54
  47. 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$p from '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
- var moment = moment$p;
46
+ var moment = moment$q;
47
47
  function isObject(item) {
48
48
  return item && typeof item === "object" && !Array.isArray(item);
49
49
  }
@@ -264,6 +264,29 @@ function createFilterString(formField, value, opts) {
264
264
  return name + " eq '" + value + "'";
265
265
  }
266
266
  }
267
+ /**
268
+ * Atualiza e força validação somente dos campos especificados.
269
+ * @param abstractControl FormGroup ou FormArray raiz.
270
+ * @param fields Lista de caminhos dos campos a validar. Ex.: ['nome', 'endereco.rua', 'itens.0.quantidade']
271
+ */
272
+ function validateSpecificControls(abstractControl, fields) {
273
+ fields.forEach(function (path) {
274
+ var control = abstractControl.get(path);
275
+ if (!control) {
276
+ console.warn("Campo n\u00E3o encontrado: " + path);
277
+ return;
278
+ }
279
+ updateSingleControl(control);
280
+ });
281
+ }
282
+ /**
283
+ * Força validação de um único AbstractControl.
284
+ */
285
+ function updateSingleControl(control) {
286
+ control.markAsDirty();
287
+ control.markAsTouched();
288
+ control.updateValueAndValidity({ emitEvent: true });
289
+ }
267
290
 
268
291
  var ContractType;
269
292
  (function (ContractType) {
@@ -367,14 +390,14 @@ var createFilterTokens = function (formField, value, translate) {
367
390
  var labelValue = value;
368
391
  switch (type) {
369
392
  case FieldType.Date:
370
- labelValue = moment$p(value).format("L");
393
+ labelValue = moment$q(value).format("L");
371
394
  break;
372
395
  case FieldType.Time:
373
- labelValue = moment$p(value).format("LTS");
396
+ labelValue = moment$q(value).format("LTS");
374
397
  break;
375
398
  case FieldType.LocalDateTime:
376
399
  case FieldType.DateTime:
377
- labelValue = moment$p(value).format("L LTS");
400
+ labelValue = moment$q(value).format("L LTS");
378
401
  break;
379
402
  case FieldType.Lookup:
380
403
  labelValue = searchFields.map(function (field) { return getProp(value, field.name); }).join(" - ");
@@ -394,7 +417,7 @@ var mergeDateTime = function (date1, date2) {
394
417
  if (!date1 || !date2) {
395
418
  return null;
396
419
  }
397
- return moment$p(moment$p(date1).format("YYYY-MM-DD") + moment$p(date2).set({ second: 0, millisecond: 0 }).format("THH:mm:ssZ"));
420
+ return moment$q(moment$q(date1).format("YYYY-MM-DD") + moment$q(date2).set({ second: 0, millisecond: 0 }).format("THH:mm:ssZ"));
398
421
  };
399
422
  var contractTypeOptions = function (translate) {
400
423
  return [
@@ -422,7 +445,7 @@ var situationOptions = function (translate, configService) {
422
445
  ];
423
446
  };
424
447
  var getSituationFilterInHistorics = function (situation) {
425
- var nowDate = moment$p().format('YYYY-MM-DD');
448
+ var nowDate = moment$q().format('YYYY-MM-DD');
426
449
  if (situation == SituationEmployee.WORKING) {
427
450
  return "(employee.dismissalDate is null or employee.dismissalDate gt '" + nowDate + "')";
428
451
  }
@@ -1034,7 +1057,7 @@ var WorkshiftModule = /** @class */ (function () {
1034
1057
  /*{CA:FILE_CONTENTS:START}*/
1035
1058
  /*{CA:FILE_CONTENTS:END}*/
1036
1059
 
1037
- var moment$1 = moment$p;
1060
+ var moment$1 = moment$q;
1038
1061
  var WorkshiftHistoryService = /** @class */ (function (_super) {
1039
1062
  __extends(WorkshiftHistoryService, _super);
1040
1063
  function WorkshiftHistoryService(http, messageService, translate) {
@@ -1316,8 +1339,8 @@ var LeaveHistoryService = /** @class */ (function (_super) {
1316
1339
  LeaveHistoryService.prototype.hasV1OrV3LeaveWithinSixtyDays = function (employeeId, referenceDate) {
1317
1340
  return this.http.post("hcm_contract/employment_additional_info/queries/hasLeaveWithESocialReasonTypeInPeriod", {
1318
1341
  employeeId: employeeId,
1319
- periodStartDate: moment$p(referenceDate).subtract(60, 'days').format('YYYY-MM-DD'),
1320
- periodEndDate: moment$p(referenceDate).subtract(1, 'millisecond').format('YYYY-MM-DD'),
1342
+ periodStartDate: moment$q(referenceDate).subtract(60, 'days').format('YYYY-MM-DD'),
1343
+ periodEndDate: moment$q(referenceDate).subtract(1, 'millisecond').format('YYYY-MM-DD'),
1321
1344
  eSocialReasonTypes: [ESocialReasonType.V1, ESocialReasonType.V3]
1322
1345
  }).pipe(this.defaultCatch(), map(function (_a) {
1323
1346
  var result = _a.result;
@@ -1352,8 +1375,8 @@ var LeaveHistoryBFFService = /** @class */ (function () {
1352
1375
  LeaveHistoryBFFService.prototype.hasV1OrV3LeaveWithinSixtyDays = function (employeeId, referenceDate) {
1353
1376
  return this.http.post(this.QUERIES_URL + "/hasLeaveWithESocialReasonTypeInPeriodBFF", {
1354
1377
  employeeId: employeeId,
1355
- periodStartDate: moment$p(referenceDate).subtract(60, 'days').format('YYYY-MM-DD'),
1356
- periodEndDate: moment$p(referenceDate).subtract(1, 'millisecond').format('YYYY-MM-DD'),
1378
+ periodStartDate: moment$q(referenceDate).subtract(60, 'days').format('YYYY-MM-DD'),
1379
+ periodEndDate: moment$q(referenceDate).subtract(1, 'millisecond').format('YYYY-MM-DD'),
1357
1380
  eSocialReasonTypes: [ESocialReasonType.V1, ESocialReasonType.V3]
1358
1381
  }).pipe(this.defaultCatch(), map(function (_a) {
1359
1382
  var result = _a.result;
@@ -1613,7 +1636,7 @@ var ESocialReasonService = /** @class */ (function (_super) {
1613
1636
  ESocialReasonService.prototype.fetchESocialReasonType = function (situationId, referenceDate) {
1614
1637
  return this.listExternalESocialReason({
1615
1638
  displayFields: ['id', 'eSocialReasonType'],
1616
- filterQuery: "situation.id eq '" + situationId + "' and competence le '" + moment$p(referenceDate).format("YYYY-MM-DD") + "'",
1639
+ filterQuery: "situation.id eq '" + situationId + "' and competence le '" + moment$q(referenceDate).format("YYYY-MM-DD") + "'",
1617
1640
  page: 0,
1618
1641
  size: 1,
1619
1642
  sort: [{ field: 'competence', order: -1 }]
@@ -2371,7 +2394,7 @@ var CoreHistoryModule = /** @class */ (function () {
2371
2394
  return CoreHistoryModule;
2372
2395
  }());
2373
2396
 
2374
- var moment$2 = moment$p; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2397
+ var moment$2 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2375
2398
  var E001Pes = /** @class */ (function () {
2376
2399
  function E001Pes() {
2377
2400
  this.excluido = false;
@@ -2396,7 +2419,7 @@ var E001Pes = /** @class */ (function () {
2396
2419
  return E001Pes;
2397
2420
  }());
2398
2421
 
2399
- var moment$3 = moment$p; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2422
+ var moment$3 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2400
2423
  var Employee = /** @class */ (function () {
2401
2424
  function Employee() {
2402
2425
  this.deleted = false;
@@ -2448,7 +2471,7 @@ var Employee = /** @class */ (function () {
2448
2471
  }());
2449
2472
 
2450
2473
  /*{CA:PACKAGE_IMPORTS:START}*/
2451
- var moment$4 = moment$p; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2474
+ var moment$4 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2452
2475
  /*{CA:PROJECT_IMPORTS:START}*/
2453
2476
  /*{CA:PROJECT_IMPORTS:END}*/
2454
2477
  var Workshift = /** @class */ (function () {
@@ -2494,7 +2517,7 @@ var Workshift = /** @class */ (function () {
2494
2517
  /*{CA:FILE_CONTENTS:END}*/
2495
2518
 
2496
2519
  /*{CA:PACKAGE_IMPORTS:START}*/
2497
- var moment$5 = moment$p; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2520
+ var moment$5 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2498
2521
  /*{CA:PROJECT_IMPORTS:START}*/
2499
2522
  /*{CA:PROJECT_IMPORTS:END}*/
2500
2523
  var WorkshiftGroup = /** @class */ (function () {
@@ -2541,7 +2564,7 @@ var WorkshiftGroup = /** @class */ (function () {
2541
2564
  /*{CA:FILE_CONTENTS:END}*/
2542
2565
 
2543
2566
  /*{CA:PACKAGE_IMPORTS:START}*/
2544
- var moment$6 = moment$p; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2567
+ var moment$6 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2545
2568
  /*{CA:PROJECT_IMPORTS:START}*/
2546
2569
  /*{CA:PROJECT_IMPORTS:END}*/
2547
2570
  var WorkshiftHistory = /** @class */ (function () {
@@ -2623,7 +2646,7 @@ var WorkshiftHistory = /** @class */ (function () {
2623
2646
  /*{CA:FILE_CONTENTS:END}*/
2624
2647
 
2625
2648
  /*{CA:PACKAGE_IMPORTS:START}*/
2626
- var moment$7 = moment$p; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2649
+ var moment$7 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2627
2650
  /*{CA:PROJECT_IMPORTS:START}*/
2628
2651
  /*{CA:PROJECT_IMPORTS:END}*/
2629
2652
  var AnnotationType = /** @class */ (function () {
@@ -2655,7 +2678,7 @@ var AnnotationType = /** @class */ (function () {
2655
2678
  /*{CA:FILE_CONTENTS:START}*/
2656
2679
  /*{CA:FILE_CONTENTS:END}*/
2657
2680
 
2658
- var moment$8 = moment$p; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2681
+ var moment$8 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2659
2682
  /*{CA:PACKAGE_IMPORTS:END}*/
2660
2683
  /*{CA:PROJECT_IMPORTS:START}*/
2661
2684
  /*{CA:PROJECT_IMPORTS:END}*/
@@ -2751,7 +2774,7 @@ var AnnotationHistory = /** @class */ (function () {
2751
2774
  /*{CA:FILE_CONTENTS:START}*/
2752
2775
  /*{CA:FILE_CONTENTS:END}*/
2753
2776
 
2754
- var moment$9 = moment$p; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2777
+ var moment$9 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2755
2778
  /*{CA:PACKAGE_IMPORTS:END}*/
2756
2779
  /*{CA:PROJECT_IMPORTS:START}*/
2757
2780
  /*{CA:PROJECT_IMPORTS:END}*/
@@ -2796,7 +2819,7 @@ var E030Ban = /** @class */ (function () {
2796
2819
  /*{CA:FILE_CONTENTS:START}*/
2797
2820
  /*{CA:FILE_CONTENTS:END}*/
2798
2821
 
2799
- var moment$a = moment$p; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2822
+ var moment$a = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2800
2823
  /*{CA:PACKAGE_IMPORTS:END}*/
2801
2824
  /*{CA:PROJECT_IMPORTS:START}*/
2802
2825
  /*{CA:PROJECT_IMPORTS:END}*/
@@ -2844,7 +2867,7 @@ var E030Age = /** @class */ (function () {
2844
2867
  /*{CA:FILE_CONTENTS:START}*/
2845
2868
  /*{CA:FILE_CONTENTS:END}*/
2846
2869
 
2847
- var moment$b = moment$p; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2870
+ var moment$b = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
2848
2871
  /*{CA:PROJECT_IMPORTS:START}*/
2849
2872
  /*{CA:PROJECT_IMPORTS:END}*/
2850
2873
  var BankAccountHistory = /** @class */ (function () {
@@ -3135,8 +3158,8 @@ var DiseaseSubgroup = /** @class */ (function () {
3135
3158
  /*{CA:CLASS_ATTRIBUTES:END}*/
3136
3159
  DiseaseSubgroup.fromDto = function (diseaseSubgroupDto, originEntity) {
3137
3160
  var model = __assign({}, diseaseSubgroupDto);
3138
- model.createdDate = model.createdDate && moment$p(model.createdDate).toDate();
3139
- model.lastModifiedDate = model.lastModifiedDate && moment$p(model.lastModifiedDate).toDate();
3161
+ model.createdDate = model.createdDate && moment$q(model.createdDate).toDate();
3162
+ model.lastModifiedDate = model.lastModifiedDate && moment$q(model.lastModifiedDate).toDate();
3140
3163
  var lookupSeparator = " - ";
3141
3164
  var displayFields = [
3142
3165
  "id",
@@ -3155,8 +3178,8 @@ var DiseaseSubgroup = /** @class */ (function () {
3155
3178
  };
3156
3179
  DiseaseSubgroup.toDto = function (diseaseSubgroup, originEntity) {
3157
3180
  var dto = __assign({}, diseaseSubgroup);
3158
- dto.createdDate = dto.createdDate && moment$p(dto.createdDate).format();
3159
- dto.lastModifiedDate = dto.lastModifiedDate && moment$p(dto.lastModifiedDate).format();
3181
+ dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
3182
+ dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
3160
3183
  delete dto.label;
3161
3184
  return dto;
3162
3185
  };
@@ -3174,8 +3197,8 @@ var Disease = /** @class */ (function () {
3174
3197
  /*{CA:CLASS_ATTRIBUTES:END}*/
3175
3198
  Disease.fromDto = function (diseaseDto, originEntity) {
3176
3199
  var model = __assign({}, diseaseDto);
3177
- model.createdDate = model.createdDate && moment$p(model.createdDate).toDate();
3178
- model.lastModifiedDate = model.lastModifiedDate && moment$p(model.lastModifiedDate).toDate();
3200
+ model.createdDate = model.createdDate && moment$q(model.createdDate).toDate();
3201
+ model.lastModifiedDate = model.lastModifiedDate && moment$q(model.lastModifiedDate).toDate();
3179
3202
  var lookupSeparator = " - ";
3180
3203
  var displayFields = [
3181
3204
  "id",
@@ -3196,8 +3219,8 @@ var Disease = /** @class */ (function () {
3196
3219
  };
3197
3220
  Disease.toDto = function (disease, originEntity) {
3198
3221
  var dto = __assign({}, disease);
3199
- dto.createdDate = dto.createdDate && moment$p(dto.createdDate).format();
3200
- dto.lastModifiedDate = dto.lastModifiedDate && moment$p(dto.lastModifiedDate).format();
3222
+ dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
3223
+ dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
3201
3224
  delete dto.label;
3202
3225
  if (originEntity !== "DiseaseSubgroup" && dto.diseaseSubgroup)
3203
3226
  dto.diseaseSubgroup = DiseaseSubgroup.toDto(dto.diseaseSubgroup, "Disease");
@@ -3217,8 +3240,8 @@ var Situation = /** @class */ (function () {
3217
3240
  /*{CA:CLASS_ATTRIBUTES:END}*/
3218
3241
  Situation.fromDto = function (situationDto, originEntity) {
3219
3242
  var model = __assign({}, situationDto);
3220
- model.createdDate = model.createdDate && moment$p(model.createdDate).toDate();
3221
- model.lastModifiedDate = model.lastModifiedDate && moment$p(model.lastModifiedDate).toDate();
3243
+ model.createdDate = model.createdDate && moment$q(model.createdDate).toDate();
3244
+ model.lastModifiedDate = model.lastModifiedDate && moment$q(model.lastModifiedDate).toDate();
3222
3245
  var lookupSeparator = " - ";
3223
3246
  var displayFields = [
3224
3247
  "id",
@@ -3238,8 +3261,8 @@ var Situation = /** @class */ (function () {
3238
3261
  };
3239
3262
  Situation.toDto = function (situation, originEntity) {
3240
3263
  var dto = __assign({}, situation);
3241
- dto.createdDate = dto.createdDate && moment$p(dto.createdDate).format();
3242
- dto.lastModifiedDate = dto.lastModifiedDate && moment$p(dto.lastModifiedDate).format();
3264
+ dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
3265
+ dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
3243
3266
  delete dto.label;
3244
3267
  return dto;
3245
3268
  };
@@ -3258,12 +3281,12 @@ var LeaveHistory = /** @class */ (function () {
3258
3281
  LeaveHistory.fromDto = function (leaveHistoryDto, originEntity) {
3259
3282
  var _a;
3260
3283
  var model = __assign({}, leaveHistoryDto);
3261
- model.startDate = model.startDate && moment$p(model.startDate).toDate();
3262
- model.endDate = model.endDate && moment$p(model.endDate).toDate();
3263
- model.birthDate = model.birthDate && moment$p(model.birthDate).toDate();
3264
- model.estimatedEndDate = model.estimatedEndDate && moment$p(model.estimatedEndDate).toDate();
3265
- model.createdDate = model.createdDate && moment$p(model.createdDate).toDate();
3266
- model.lastModifiedDate = model.lastModifiedDate && moment$p(model.lastModifiedDate).toDate();
3284
+ model.startDate = model.startDate && moment$q(model.startDate).toDate();
3285
+ model.endDate = model.endDate && moment$q(model.endDate).toDate();
3286
+ model.birthDate = model.birthDate && moment$q(model.birthDate).toDate();
3287
+ model.estimatedEndDate = model.estimatedEndDate && moment$q(model.estimatedEndDate).toDate();
3288
+ model.createdDate = model.createdDate && moment$q(model.createdDate).toDate();
3289
+ model.lastModifiedDate = model.lastModifiedDate && moment$q(model.lastModifiedDate).toDate();
3267
3290
  var lookupSeparator = " - ";
3268
3291
  var displayFields = [
3269
3292
  "id",
@@ -3311,8 +3334,8 @@ var LeaveHistory = /** @class */ (function () {
3311
3334
  LeaveHistory.toDto = function (leaveHistory, originEntity) {
3312
3335
  var _a;
3313
3336
  var dto = __assign({}, leaveHistory);
3314
- dto.startDate = dto.startDate && moment$p(dto.startDate).format("YYYY-MM-DD");
3315
- dto.endDate = dto.endDate && moment$p(dto.endDate).format("YYYY-MM-DD");
3337
+ dto.startDate = dto.startDate && moment$q(dto.startDate).format("YYYY-MM-DD");
3338
+ dto.endDate = dto.endDate && moment$q(dto.endDate).format("YYYY-MM-DD");
3316
3339
  if ((dto === null || dto === void 0 ? void 0 : dto.cnpjUnion) && typeof (dto === null || dto === void 0 ? void 0 : dto.cnpjUnion) === "string") {
3317
3340
  dto.cnpjUnion = +dto.cnpjUnion.replaceAll(".", "").replaceAll("/", "").replaceAll("-", "");
3318
3341
  }
@@ -3325,10 +3348,10 @@ var LeaveHistory = /** @class */ (function () {
3325
3348
  if (!((_a = dto === null || dto === void 0 ? void 0 : dto.cnpjForElectiveMandatory) === null || _a === void 0 ? void 0 : _a.length)) {
3326
3349
  dto.cnpjForElectiveMandatory = null;
3327
3350
  }
3328
- dto.birthDate = dto.birthDate && moment$p(dto.birthDate).format("YYYY-MM-DD");
3329
- dto.estimatedEndDate = dto.estimatedEndDate && moment$p(dto.estimatedEndDate).format("YYYY-MM-DD");
3330
- dto.createdDate = dto.createdDate && moment$p(dto.createdDate).format();
3331
- dto.lastModifiedDate = dto.lastModifiedDate && moment$p(dto.lastModifiedDate).format();
3351
+ dto.birthDate = dto.birthDate && moment$q(dto.birthDate).format("YYYY-MM-DD");
3352
+ dto.estimatedEndDate = dto.estimatedEndDate && moment$q(dto.estimatedEndDate).format("YYYY-MM-DD");
3353
+ dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
3354
+ dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
3332
3355
  delete dto.label;
3333
3356
  if (originEntity !== "Employee" && dto.employee)
3334
3357
  dto.employee = Employee.toDto(dto.employee, "LeaveHistory");
@@ -3358,7 +3381,7 @@ var LeaveHistory = /** @class */ (function () {
3358
3381
  var companyIds = (_b = filter === null || filter === void 0 ? void 0 : filter.companyIds) === null || _b === void 0 ? void 0 : _b.map(function (dto) { return dto.id; });
3359
3382
  var advancedFilterId = (_c = filter === null || filter === void 0 ? void 0 : filter.advancedFilter) === null || _c === void 0 ? void 0 : _c.id;
3360
3383
  var leaveHistoryDto = __assign({}, entity);
3361
- var leaveHistoryBatchDTO = __assign(__assign({}, entity), { startDate: entity.startDate && moment$p(entity.startDate).format("YYYY-MM-DD"), endDate: entity.endDate && moment$p(entity.endDate).format("YYYY-MM-DD"), situationId: entity.situation.id, estimatedEndDate: entity.estimatedEndDate && moment$p(entity.estimatedEndDate).format("YYYY-MM-DD") });
3384
+ var leaveHistoryBatchDTO = __assign(__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") });
3362
3385
  if (leaveHistoryBatchDTO.cnpjUnion && typeof leaveHistoryBatchDTO.cnpjUnion === "string") {
3363
3386
  leaveHistoryBatchDTO.cnpjUnion = +leaveHistoryDto.cnpjUnion.replaceAll(".", "").replaceAll("/", "").replaceAll("-", "");
3364
3387
  }
@@ -3390,9 +3413,9 @@ var ESocialReason = /** @class */ (function () {
3390
3413
  /*{CA:CLASS_ATTRIBUTES:END}*/
3391
3414
  ESocialReason.fromDto = function (eSocialReasonDto, originEntity) {
3392
3415
  var model = __assign({}, eSocialReasonDto);
3393
- model.competence = model.competence && moment$p(model.competence).toDate();
3394
- model.createdDate = model.createdDate && moment$p(model.createdDate).toDate();
3395
- model.lastModifiedDate = model.lastModifiedDate && moment$p(model.lastModifiedDate).toDate();
3416
+ model.competence = model.competence && moment$q(model.competence).toDate();
3417
+ model.createdDate = model.createdDate && moment$q(model.createdDate).toDate();
3418
+ model.lastModifiedDate = model.lastModifiedDate && moment$q(model.lastModifiedDate).toDate();
3396
3419
  var lookupSeparator = " - ";
3397
3420
  var displayFields = [
3398
3421
  "id",
@@ -3411,9 +3434,9 @@ var ESocialReason = /** @class */ (function () {
3411
3434
  };
3412
3435
  ESocialReason.toDto = function (eSocialReason, originEntity) {
3413
3436
  var dto = __assign({}, eSocialReason);
3414
- dto.competence = dto.competence && moment$p(dto.competence).format("YYYY-MM-DD");
3415
- dto.createdDate = dto.createdDate && moment$p(dto.createdDate).format();
3416
- dto.lastModifiedDate = dto.lastModifiedDate && moment$p(dto.lastModifiedDate).format();
3437
+ dto.competence = dto.competence && moment$q(dto.competence).format("YYYY-MM-DD");
3438
+ dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
3439
+ dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
3417
3440
  delete dto.label;
3418
3441
  if (originEntity !== "Situation" && dto.situation)
3419
3442
  dto.situation = Situation.toDto(dto.situation, "ESocialReason");
@@ -3435,10 +3458,10 @@ var RegulatoryNormTrainingHistory = /** @class */ (function () {
3435
3458
  /*{CA:CLASS_ATTRIBUTES:END}*/
3436
3459
  RegulatoryNormTrainingHistory.fromDto = function (regulatoryNormTrainingHistoryDto, originEntity) {
3437
3460
  var model = __assign({}, regulatoryNormTrainingHistoryDto);
3438
- model.startDate = model.startDate && moment$p(model.startDate).toDate();
3439
- model.endDate = model.endDate && moment$p(model.endDate).toDate();
3440
- model.createdDate = model.createdDate && moment$p(model.createdDate).toDate();
3441
- model.lastModifiedDate = model.lastModifiedDate && moment$p(model.lastModifiedDate).toDate();
3461
+ model.startDate = model.startDate && moment$q(model.startDate).toDate();
3462
+ model.endDate = model.endDate && moment$q(model.endDate).toDate();
3463
+ model.createdDate = model.createdDate && moment$q(model.createdDate).toDate();
3464
+ model.lastModifiedDate = model.lastModifiedDate && moment$q(model.lastModifiedDate).toDate();
3442
3465
  var lookupSeparator = " - ";
3443
3466
  var displayFields = [
3444
3467
  "id",
@@ -3457,10 +3480,10 @@ var RegulatoryNormTrainingHistory = /** @class */ (function () {
3457
3480
  };
3458
3481
  RegulatoryNormTrainingHistory.toDto = function (regulatoryNormTrainingHistory, originEntity) {
3459
3482
  var dto = __assign({}, regulatoryNormTrainingHistory);
3460
- dto.startDate = dto.startDate && moment$p(dto.startDate).format("YYYY-MM-DD");
3461
- dto.endDate = dto.endDate && moment$p(dto.endDate).format("YYYY-MM-DD");
3462
- dto.createdDate = dto.createdDate && moment$p(dto.createdDate).format();
3463
- dto.lastModifiedDate = dto.lastModifiedDate && moment$p(dto.lastModifiedDate).format();
3483
+ dto.startDate = dto.startDate && moment$q(dto.startDate).format("YYYY-MM-DD");
3484
+ dto.endDate = dto.endDate && moment$q(dto.endDate).format("YYYY-MM-DD");
3485
+ dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
3486
+ dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
3464
3487
  delete dto.label;
3465
3488
  if (originEntity !== "Employee" && dto.employee)
3466
3489
  dto.employee = Employee.toDto(dto.employee, "RegulatoryNormTrainingHistory");
@@ -3567,8 +3590,8 @@ var DateValidator = /** @class */ (function () {
3567
3590
  var validator = function (control) {
3568
3591
  var referenceDate = control && control.value;
3569
3592
  if (referenceDate && dateFormat) {
3570
- referenceDate = moment$p(control.value);
3571
- var compareTo = moment$p(compareToDate, dateFormat);
3593
+ referenceDate = moment$q(control.value);
3594
+ var compareTo = moment$q(compareToDate, dateFormat);
3572
3595
  return _this.dateCompare(referenceDate, compareTo, compareType, options);
3573
3596
  }
3574
3597
  return null;
@@ -3710,7 +3733,7 @@ function removeErrorFromField(field, error) {
3710
3733
  }
3711
3734
  function startDateIsBeforeEndDateValidator(startDate, endDate) {
3712
3735
  if (startDate && endDate && startDate.value && endDate.value) {
3713
- var forbidden = moment$p(startDate.value).isSameOrAfter(endDate.value) ? { startDateIsBeforeEndDate: { value: endDate.value } } : null;
3736
+ var forbidden = moment$q(startDate.value).isSameOrAfter(endDate.value) ? { startDateIsBeforeEndDate: { value: endDate.value } } : null;
3714
3737
  if (forbidden) {
3715
3738
  startDate.markAsDirty();
3716
3739
  endDate.markAsDirty();
@@ -3730,7 +3753,7 @@ function startDateIsBeforeEndDateValidator(startDate, endDate) {
3730
3753
  return null;
3731
3754
  }
3732
3755
 
3733
- var moment$c = moment$p;
3756
+ var moment$c = moment$q;
3734
3757
  var BaseHistoryComponent = /** @class */ (function () {
3735
3758
  function BaseHistoryComponent(translate, baseService, platformService, messageService) {
3736
3759
  this.translate = translate;
@@ -4062,7 +4085,7 @@ var FocusService = /** @class */ (function () {
4062
4085
  return FocusService;
4063
4086
  }());
4064
4087
 
4065
- var moment$d = moment$p; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
4088
+ var moment$d = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
4066
4089
  var ClockingEventTimeEvaluationGeneralService = /** @class */ (function () {
4067
4090
  function ClockingEventTimeEvaluationGeneralService(http) {
4068
4091
  this.http = http;
@@ -4539,7 +4562,7 @@ var BaseHistoryModule = /** @class */ (function () {
4539
4562
  return BaseHistoryModule;
4540
4563
  }());
4541
4564
 
4542
- var moment$e = moment$p;
4565
+ var moment$e = moment$q;
4543
4566
  var BaseCollectiveHistoryComponent = /** @class */ (function (_super) {
4544
4567
  __extends(BaseCollectiveHistoryComponent, _super);
4545
4568
  function BaseCollectiveHistoryComponent(translate, baseService, platformService, messageService, collectiveService) {
@@ -4757,7 +4780,7 @@ var ProfileType;
4757
4780
  ProfileType["MANAGEMENT"] = "MANAGEMENT";
4758
4781
  })(ProfileType || (ProfileType = {}));
4759
4782
 
4760
- var moment$f = moment$p;
4783
+ var moment$f = moment$q;
4761
4784
  var ClockingEventComponent = /** @class */ (function (_super) {
4762
4785
  __extends(ClockingEventComponent, _super);
4763
4786
  function ClockingEventComponent(translate, baseService, employeeService, platformService, messageService, leaveHistoryBffService) {
@@ -4983,7 +5006,7 @@ var ClockingEventComponent = /** @class */ (function (_super) {
4983
5006
  return ClockingEventComponent;
4984
5007
  }(BaseCollectiveHistoryComponent));
4985
5008
 
4986
- var moment$g = moment$p;
5009
+ var moment$g = moment$q;
4987
5010
  var WorkshiftHistoryFormComponent = /** @class */ (function (_super) {
4988
5011
  __extends(WorkshiftHistoryFormComponent, _super);
4989
5012
  function WorkshiftHistoryFormComponent(workshiftHistoryService, router, route, messageService, confirmationService, formBuilder, translate, hotkeysService, fieldCustomization, focusService, workshiftGroupService, employeeService, cd, baseService, clockingEventFoundationGeneralService, platformService, workshiftLookupService, collectiveService, workshiftHistoryAdjustmentService, employeeLibService, workshiftInformationHistoryService) {
@@ -5761,7 +5784,7 @@ var E070FilService = /** @class */ (function (_super) {
5761
5784
  /*{CA:FILE_CONTENTS:START}*/
5762
5785
  /*{CA:FILE_CONTENTS:END}*/
5763
5786
 
5764
- var moment$h = moment$p;
5787
+ var moment$h = moment$q;
5765
5788
  var WorkshiftHistoryListComponent = /** @class */ (function (_super) {
5766
5789
  __extends(WorkshiftHistoryListComponent, _super);
5767
5790
  function WorkshiftHistoryListComponent(
@@ -6899,7 +6922,7 @@ var ClockingEventModule = /** @class */ (function () {
6899
6922
  return ClockingEventModule;
6900
6923
  }());
6901
6924
 
6902
- var moment$i = moment$p; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
6925
+ var moment$i = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
6903
6926
  function mapLookupFilterQuery(value, type, name) {
6904
6927
  if (typeof value == "number")
6905
6928
  return name + " eq " + value;
@@ -7103,13 +7126,13 @@ var EmployeeLookupService = /** @class */ (function () {
7103
7126
  return name + " eq " + value;
7104
7127
  }
7105
7128
  else if (type === FieldType.Date) {
7106
- return name + " eq '" + moment$p(value).format("YYYY-MM-DD") + "'";
7129
+ return name + " eq '" + moment$q(value).format("YYYY-MM-DD") + "'";
7107
7130
  }
7108
7131
  else if (type === FieldType.Time) {
7109
- return name + " eq '" + moment$p(value).format("HH:mm:ss") + "'";
7132
+ return name + " eq '" + moment$q(value).format("HH:mm:ss") + "'";
7110
7133
  }
7111
7134
  else if (type === FieldType.DateTime) {
7112
- return name + " eq '" + moment$p(value).format() + "'";
7135
+ return name + " eq '" + moment$q(value).format() + "'";
7113
7136
  }
7114
7137
  else if (type === FieldType.Enum) {
7115
7138
  return name + " eq '" + value + "'";
@@ -7149,13 +7172,13 @@ var EmployeeLookupService = /** @class */ (function () {
7149
7172
  return name + " eq " + value;
7150
7173
  }
7151
7174
  else if (type === FieldType.Date) {
7152
- return name + " eq '" + moment$p(value).format("YYYY-MM-DD") + "'";
7175
+ return name + " eq '" + moment$q(value).format("YYYY-MM-DD") + "'";
7153
7176
  }
7154
7177
  else if (type === FieldType.Time) {
7155
- return name + " eq '" + moment$p(value).format("HH:mm:ss") + "'";
7178
+ return name + " eq '" + moment$q(value).format("HH:mm:ss") + "'";
7156
7179
  }
7157
7180
  else if (type === FieldType.DateTime) {
7158
- return name + " eq '" + moment$p(value).format() + "'";
7181
+ return name + " eq '" + moment$q(value).format() + "'";
7159
7182
  }
7160
7183
  else if (type === FieldType.Enum) {
7161
7184
  return _this.loadEnumFromLabel(value)
@@ -7772,7 +7795,7 @@ var WorkshiftHistoryFeatureModule = /** @class */ (function () {
7772
7795
  return WorkshiftHistoryFeatureModule;
7773
7796
  }());
7774
7797
 
7775
- var moment$j = moment$p; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
7798
+ var moment$j = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
7776
7799
  var AnnotationHistoryFormComponent = /** @class */ (function (_super) {
7777
7800
  __extends(AnnotationHistoryFormComponent, _super);
7778
7801
  function AnnotationHistoryFormComponent(annotationHistoryService, router, route, messageService, confirmationService, formBuilder, translate, hotkeysService, fieldCustomization, focusService, annotationTypeLookupService, employeeService, baseService, platformService, cd, collectiveService, sanitizer, annotationHistoryAttachmentService, employeeLookupService) {
@@ -8522,7 +8545,7 @@ var AnnotationHistoryFormComponent = /** @class */ (function (_super) {
8522
8545
  /*{CA:FILE_CONTENTS:END}*/
8523
8546
 
8524
8547
  /*{CA:EXTERNAL_IMPORTS:START}*/
8525
- var moment$k = moment$p; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
8548
+ var moment$k = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
8526
8549
  /*{CA:EXTERNAL_IMPORTS:END}*/
8527
8550
  /*{CA:PROJECT_IMPORTS:START}*/
8528
8551
  /*{CA:PROJECT_IMPORTS:END}*/
@@ -11541,7 +11564,7 @@ var LeaveHistoryFormComponent = /** @class */ (function (_super) {
11541
11564
  if (employeeId && referenceDate) {
11542
11565
  var estimatedJourneyCompleted = this.formGroup.get("estimatedJourneyCompleted").value;
11543
11566
  var actualReferenceDate = (estimatedJourneyCompleted ?
11544
- moment$p(referenceDate).format("YYYY-MM-DDTHH:mm:ss-00:00") : referenceDate);
11567
+ moment$q(referenceDate).format("YYYY-MM-DDTHH:mm:ss-00:00") : referenceDate);
11545
11568
  return this.getObservable(employeeId, actualReferenceDate);
11546
11569
  }
11547
11570
  else {
@@ -12225,7 +12248,7 @@ var LeaveHistoryFormComponent = /** @class */ (function (_super) {
12225
12248
  var startDate = this.formGroup.get("startDate").value;
12226
12249
  var estimatedEndDate = this.formGroup.get("estimatedEndDate").value;
12227
12250
  if (startDate && estimatedEndDate) {
12228
- var estimatedDayEnd = moment$p(estimatedEndDate).diff(moment$p(startDate), "days") + 1;
12251
+ var estimatedDayEnd = moment$q(estimatedEndDate).diff(moment$q(startDate), "days") + 1;
12229
12252
  control.setValue(estimatedDayEnd);
12230
12253
  }
12231
12254
  }
@@ -12246,7 +12269,7 @@ var LeaveHistoryFormComponent = /** @class */ (function (_super) {
12246
12269
  var startDate = this.formGroup.get("startDate").value;
12247
12270
  var estimatedDayEnd = this.formGroup.get("estimatedDayEnd").value;
12248
12271
  if (startDate && estimatedDayEnd) {
12249
- var estimatedEndDate = moment$p(startDate).add(estimatedDayEnd, "days").add(-1, "day").toDate();
12272
+ var estimatedEndDate = moment$q(startDate).add(estimatedDayEnd, "days").add(-1, "day").toDate();
12250
12273
  control.setValue(estimatedEndDate);
12251
12274
  }
12252
12275
  }
@@ -12281,7 +12304,7 @@ var LeaveHistoryFormComponent = /** @class */ (function (_super) {
12281
12304
  return this.formGroupDependent(function () {
12282
12305
  var startDate = _this.formGroup.get("startDate").value;
12283
12306
  var estimatedEndDate = _this.formGroup.get("estimatedEndDate").value;
12284
- if (startDate && estimatedEndDate && moment$p(startDate).isAfter(moment$p(estimatedEndDate))) {
12307
+ if (startDate && estimatedEndDate && moment$q(startDate).isAfter(moment$q(estimatedEndDate))) {
12285
12308
  return { estimatedEndDateMustBeGreaterThanOrEqualToStartDate: true };
12286
12309
  }
12287
12310
  return null;
@@ -12301,8 +12324,8 @@ var LeaveHistoryFormComponent = /** @class */ (function (_super) {
12301
12324
  var startDateValue = _this.formGroup.get("startDate").value;
12302
12325
  var endDateValue = _this.formGroup.get("endDate").value;
12303
12326
  var estimatedJourneyCompletedValue = _this.formGroup.get("estimatedJourneyCompleted").value;
12304
- var startTimeValue = estimatedJourneyCompletedValue ? moment$p().hours(0).minutes(0) : _this.formGroup.get("startTime").value;
12305
- var endTimeValue = estimatedJourneyCompletedValue ? moment$p().hours(23).minutes(59) : _this.formGroup.get("endTime").value;
12327
+ var startTimeValue = estimatedJourneyCompletedValue ? moment$q().hours(0).minutes(0) : _this.formGroup.get("startTime").value;
12328
+ var endTimeValue = estimatedJourneyCompletedValue ? moment$q().hours(23).minutes(59) : _this.formGroup.get("endTime").value;
12306
12329
  var startDateTimeConcat = _this.getFullDateTime(startDateValue, startTimeValue);
12307
12330
  var endDateTimeConcat = _this.getFullDateTime(endDateValue, endTimeValue);
12308
12331
  if (startDateValue && startTimeValue && endDateValue && endTimeValue && startDateTimeConcat.isAfter(endDateTimeConcat)) {
@@ -12336,8 +12359,8 @@ var LeaveHistoryFormComponent = /** @class */ (function (_super) {
12336
12359
  var value = control.value;
12337
12360
  var startDate = _this.formGroup.get("startDate").value;
12338
12361
  var endDate = _this.formGroup.get("endDate").value;
12339
- var startDatePlusJustifiedDays = (startDate && value) && (moment$p(startDate).add(value, "days").subtract(1, "days"));
12340
- if (endDate && startDatePlusJustifiedDays && moment$p(startDatePlusJustifiedDays).isAfter(endDate)) {
12362
+ var startDatePlusJustifiedDays = (startDate && value) && (moment$q(startDate).add(value, "days").subtract(1, "days"));
12363
+ if (endDate && startDatePlusJustifiedDays && moment$q(startDatePlusJustifiedDays).isAfter(endDate)) {
12341
12364
  return { justifiedDaysQuantityMustBeLowerThanEndDate: true };
12342
12365
  }
12343
12366
  return null;
@@ -12346,7 +12369,7 @@ var LeaveHistoryFormComponent = /** @class */ (function (_super) {
12346
12369
  LeaveHistoryFormComponent.prototype.getTimeIsNotZeroValidator = function () {
12347
12370
  return this.formGroupDependent(function (control) {
12348
12371
  var value = control.value;
12349
- var convertedValue = value && moment$p(value).isValid() && moment$p(value).format("HH:mm");
12372
+ var convertedValue = value && moment$q(value).isValid() && moment$q(value).format("HH:mm");
12350
12373
  var isDateTimeZero = convertedValue === "00:00";
12351
12374
  if (isDateTimeZero) {
12352
12375
  return { timeMustNotBeZero: true };
@@ -12369,7 +12392,7 @@ var LeaveHistoryFormComponent = /** @class */ (function (_super) {
12369
12392
  if (time) {
12370
12393
  return mergeDateTime(date, time);
12371
12394
  }
12372
- return moment$p(date);
12395
+ return moment$q(date);
12373
12396
  }
12374
12397
  return null;
12375
12398
  };
@@ -12381,10 +12404,10 @@ var LeaveHistoryFormComponent = /** @class */ (function (_super) {
12381
12404
  var estimatedJourneyCompletedControl = this.formGroup.get("estimatedJourneyCompleted");
12382
12405
  if (this.isHourAndMinuteZero(startTimeControl.value)) {
12383
12406
  estimatedJourneyCompletedControl.setValue(true);
12384
- startDateControl.setValue(moment$p(startDateControl.value).toDate());
12407
+ startDateControl.setValue(moment$q(startDateControl.value).toDate());
12385
12408
  startTimeControl.setValue(null);
12386
12409
  if (endDateControl.value) {
12387
- endDateControl.setValue(moment$p(endDateControl.value).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).toDate());
12410
+ endDateControl.setValue(moment$q(endDateControl.value).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).toDate());
12388
12411
  }
12389
12412
  endTimeControl.setValue(null);
12390
12413
  this.setEnabledStatus(endTimeControl, false);
@@ -12397,7 +12420,7 @@ var LeaveHistoryFormComponent = /** @class */ (function (_super) {
12397
12420
  this.setEnabledStatus(estimatedJourneyCompletedControl, false);
12398
12421
  };
12399
12422
  LeaveHistoryFormComponent.prototype.isHourAndMinuteZero = function (value) {
12400
- return moment$p(value).hours() === 0 && moment$p(value).minutes() === 0;
12423
+ return moment$q(value).hours() === 0 && moment$q(value).minutes() === 0;
12401
12424
  };
12402
12425
  LeaveHistoryFormComponent.prototype.loadLabelFromEnumOptions = function (value, enumOptions) {
12403
12426
  var foundEnum = enumOptions.filter(function (r) { return r.value === value; }) || this.situationTypeOptions.filter(function (r) { return r.value === value; });
@@ -12430,7 +12453,7 @@ var LeaveHistoryFormComponent = /** @class */ (function (_super) {
12430
12453
  }
12431
12454
  else {
12432
12455
  var leaveHistory = new LeaveHistory();
12433
- leaveHistory.startDate = startDate ? moment$p(startDate).toDate() : leaveHistory.startDate;
12456
+ leaveHistory.startDate = startDate ? moment$q(startDate).toDate() : leaveHistory.startDate;
12434
12457
  leaveHistory.employee = Employee.fromDto(dtoContent);
12435
12458
  this.startFuncionsByBaseHistory();
12436
12459
  this.applyAllFieldBehaviour();
@@ -12661,7 +12684,7 @@ var LeaveHistoryFormComponent = /** @class */ (function (_super) {
12661
12684
  /*{CA:FILE_CONTENTS:START}*/
12662
12685
  /*{CA:FILE_CONTENTS:END}*/
12663
12686
 
12664
- var moment$l = moment$p;
12687
+ var moment$l = moment$q;
12665
12688
  var LeaveHistoryListComponent = /** @class */ (function (_super) {
12666
12689
  __extends(LeaveHistoryListComponent, _super);
12667
12690
  function LeaveHistoryListComponent(router, route, leaveHistoryService, confirmationService, situationService, translate, baseService, messageService, hotkeysService, formBuilder, filtersStorageService, paginatorStorageService, companyService, companyBranchService, employeeLookupService, platformService, configService) {
@@ -13640,7 +13663,7 @@ var LeaveHistoryFeatureModule = /** @class */ (function () {
13640
13663
  return LeaveHistoryFeatureModule;
13641
13664
  }());
13642
13665
 
13643
- var moment$m = moment$p;
13666
+ var moment$m = moment$q;
13644
13667
  var BankAccountItemComponent = /** @class */ (function () {
13645
13668
  function BankAccountItemComponent(
13646
13669
  /*{CA:INJECTIONS:START}*/
@@ -14282,60 +14305,6 @@ var BankAccountItemModule = /** @class */ (function () {
14282
14305
  return BankAccountItemModule;
14283
14306
  }());
14284
14307
 
14285
- var fallback = {
14286
- "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.",
14287
- "hcm_contract.employment_additional_info.annotation_history": "Histórico de Anotação",
14288
- "hcm_contract.employment_additional_info.annotation_history_annotation": "Anotação",
14289
- "hcm_contract.employment_additional_info.annotation_history_contract": "Colaborador",
14290
- "hcm_contract.employment_additional_info.annotation_history_contract_code": "Colaborador",
14291
- "hcm_contract.employment_additional_info.annotation_history_contract_person_nom_pes": "Nome do colaborador",
14292
- "hcm_contract.employment_additional_info.annotation_history_contract_search_title": "Colaborador",
14293
- "hcm_contract.employment_additional_info.annotation_history_date": "Data",
14294
- "hcm_contract.employment_contract.admission_generic_field_validator_editable": "Campo desabilitado para edição.",
14295
- "hcm_contract.employment_additional_info.annotation_history_document_number": "Número do documento",
14296
- "hcm_contract.employment_additional_info.annotation_history_employee": "Colaborador",
14297
- "hcm_contract.employment_additional_info.annotation_history_empty_state_description": "Não há registros cadastrados até o momento.",
14298
- "hcm_contract.employment_additional_info.annotation_history_empty_state_title": "Nenhum resultado encontrado",
14299
- "hcm_contract.employment_additional_info.annotation_history_form_general_title": "Histórico de anotação",
14300
- "hcm_contract.employment_additional_info.annotation_history_form_title": "Histórico de anotação",
14301
- "hcm_contract.employment_additional_info.annotation_history_id": "Identificador único",
14302
- "hcm_contract.employment_additional_info.annotation_history_list_grid_title": "Lista de históricos de anotação",
14303
- "hcm_contract.employment_additional_info.annotation_history_list_title": "Histórico de anotação",
14304
- "hcm_contract.employment_additional_info.annotation_history_responsible": "Responsável",
14305
- "hcm_contract.employment_additional_info.annotation_history_responsible_search_title": "Responsável",
14306
- "hcm_contract.employment_additional_info.annotation_history_type": "Tipo",
14307
- "hcm_contract.employment_additional_info.annotation_history_type_code": "Tipo",
14308
- "hcm_contract.employment_additional_info.annotation_history_type_name": "Descrição do tipo",
14309
- "hcm_contract.employment_additional_info.annotation_history_type_search_title": "Tipo",
14310
- "hcm_contract.employment_additional_info.annotation_history_employee_code": "Código",
14311
- "hcm_contract.employment_additional_info.annotation_history_employee_person_nom_pes": "Nome do colaborador",
14312
- "hcm_contract.employment_additional_info.annotation_history_employee_search_title": "Colaborador",
14313
- "hcm_contract.employment_additional_info.employee_employment_relationship_contract_type": "Tipo de contrato",
14314
- "hcm_contract.employment_additional_info.contract_type_aprentice": "Aprendiz",
14315
- "hcm_contract.employment_additional_info.contract_type_director": "Diretor",
14316
- "hcm_contract.employment_additional_info.contract_type_employee": "Empregado",
14317
- "hcm_contract.employment_additional_info.contract_type_third_party": "Terceiro",
14318
- "hcm_contract.employment_additional_info.contract_type_trainee": "Estagiário",
14319
- "hcm_contract.employment_additional_info.employee_employer_cod_emp": "Código da empresa",
14320
- "hcm_contract.employment_additional_info.employee_code": "Cadastro",
14321
- "hcm_contract.employment_additional_info.employee_person_nom_pes": "Nome do colaborador",
14322
- "hcm_contract.employment_additional_info.filter": "Filtrar",
14323
- "hcm_contract.employment_additional_info.filters": "Filtros",
14324
- "hcm_contract.employment_additional_info.total_records": "{{value}} registro(s) encontrado(s)",
14325
- "hcm_contract.employment_additional_info.records_found": "registro(s) encontrado(s)",
14326
- "hcm_contract.employment_additional_info.cancel": "Cancelar",
14327
- "hcm_contract.employment_additional_info.select": "Selecionar",
14328
- "hcm_contract.employment_additional_info.clear": "Limpar",
14329
- "hcm_contract.employment_additional_info.annotation_type_code": "Tipo",
14330
- "hcm_contract.employment_additional_info.annotation_type_name": "Descrição do tipo",
14331
- "hcm_contract.employment_additional_info.saved_message_content": "Registro(s) salvo(s) com sucesso.",
14332
- "hcm_contract.employment_additional_info.saved_message_title": "Sucesso",
14333
- "hcm_contract.employment_additional_info.nothing_found": "Nenhum registro encontrado",
14334
- "hcm_contract.employment_contract.add_employee_dependent": "Adicionar dependente",
14335
- "hcm_contract.employment_contract.employee_dependent_list": "Dependentes",
14336
- "hcm_contract.employment_contract.employee_dependent_list_kinship": "Parentesco"
14337
- };
14338
-
14339
14308
  var ESocialTrainingCodeType;
14340
14309
  (function (ESocialTrainingCodeType) {
14341
14310
  ESocialTrainingCodeType["V1006"] = "V1006";
@@ -14408,7 +14377,7 @@ var RegulatoryNormTrainingHistoryListComponent = /** @class */ (function () {
14408
14377
  RegulatoryNormTrainingHistoryListComponent.prototype.setStartDateValidator = function () {
14409
14378
  var _this = this;
14410
14379
  return function (control) {
14411
- if (_this.personBirthDate && control.value && moment$p(control.value).isBefore(moment$p(_this.personBirthDate), "day")) {
14380
+ if (_this.personBirthDate && control.value && moment$q(control.value).isBefore(moment$q(_this.personBirthDate), "day")) {
14412
14381
  return { startDateBeforeBirthdate: true };
14413
14382
  }
14414
14383
  else {
@@ -14495,7 +14464,7 @@ var RegulatoryNormTrainingHistoryListComponent = /** @class */ (function () {
14495
14464
  if (this.formArray) {
14496
14465
  this.formArray.controls.forEach(function (form) {
14497
14466
  var control = form.get('startDate');
14498
- if (_this.personBirthDate && control.value && moment$p(control.value).isBefore(moment$p(_this.personBirthDate), "day")) {
14467
+ if (_this.personBirthDate && control.value && moment$q(control.value).isBefore(moment$q(_this.personBirthDate), "day")) {
14499
14468
  control.setErrors({ startDateBeforeBirthdate: true });
14500
14469
  }
14501
14470
  else {
@@ -14819,6 +14788,27 @@ var EmployeeSummaryModule = /** @class */ (function () {
14819
14788
  return EmployeeSummaryModule;
14820
14789
  }());
14821
14790
 
14791
+ var DependentDraftService = /** @class */ (function (_super) {
14792
+ __extends(DependentDraftService, _super);
14793
+ function DependentDraftService(http, messageService, translate) {
14794
+ var _this = _super.call(this, http, messageService, "hcm_contract/employment_contract/entities/dependentDraft", "hcm_contract/employment_contract/actions", translate) || this;
14795
+ _this.http = http;
14796
+ _this.messageService = messageService;
14797
+ _this.translate = translate;
14798
+ _this.saveDraftEvent = new Subject();
14799
+ return _this;
14800
+ }
14801
+ DependentDraftService.ctorParameters = function () { return [
14802
+ { type: HttpClient },
14803
+ { type: MessageService },
14804
+ { type: TranslateService }
14805
+ ]; };
14806
+ DependentDraftService = __decorate([
14807
+ Injectable()
14808
+ ], DependentDraftService);
14809
+ return DependentDraftService;
14810
+ }(EntityService));
14811
+
14822
14812
  var CountryService = /** @class */ (function (_super) {
14823
14813
  __extends(CountryService, _super);
14824
14814
  function CountryService(http, messageService, translate) {
@@ -15387,9 +15377,68 @@ var EmployeeDependentDocumentTabComponent = /** @class */ (function () {
15387
15377
  return EmployeeDependentDocumentTabComponent;
15388
15378
  }());
15389
15379
 
15380
+ var DependentDraft = /** @class */ (function () {
15381
+ function DependentDraft() {
15382
+ }
15383
+ DependentDraft.fromDto = function (dependentDraftDto) {
15384
+ var parse = (dependentDraftDto === null || dependentDraftDto === void 0 ? void 0 : dependentDraftDto.data) && JSON.parse(dependentDraftDto.data);
15385
+ var model = {
15386
+ basicDependentPersonData: parse.basicDependentPersonData ? this.normalizeDraft(parse.basicDependentPersonData) : {},
15387
+ documentDependentPersonData: parse.documentDependentPersonData ? this.normalizeDraft(parse.documentDependentPersonData) : {},
15388
+ complementDependentPersonData: parse.complementDependentPersonData
15389
+ ? this.normalizeDraft(parse.complementDependentPersonData) : {},
15390
+ };
15391
+ return model;
15392
+ };
15393
+ DependentDraft.toDto = function (dependentDraft, employeeId, admissionDraftId) {
15394
+ var _a, _b;
15395
+ var dto = {};
15396
+ dto.personName = (_a = dependentDraft === null || dependentDraft === void 0 ? void 0 : dependentDraft.basicDependentPersonData) === null || _a === void 0 ? void 0 : _a.fullName;
15397
+ dto.kinshipDegreeType = (_b = dependentDraft === null || dependentDraft === void 0 ? void 0 : dependentDraft.complementDependentPersonData) === null || _b === void 0 ? void 0 : _b.kinshipDependentDegreeType;
15398
+ dto.employee = employeeId ? { id: employeeId } : null;
15399
+ dto.admissionDraft = admissionDraftId ? { id: admissionDraftId } : null;
15400
+ dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
15401
+ dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
15402
+ dto.data = JSON.stringify({
15403
+ basicDependentPersonData: dependentDraft.basicDependentPersonData,
15404
+ documentDependentPersonData: dependentDraft.documentDependentPersonData,
15405
+ complementDependentPersonData: dependentDraft.complementDependentPersonData,
15406
+ });
15407
+ return dto;
15408
+ };
15409
+ DependentDraft.normalizeDraft = function (obj) {
15410
+ var _this = this;
15411
+ if (!obj || typeof obj !== "object") {
15412
+ return obj;
15413
+ }
15414
+ Object.keys(obj).forEach(function (key) {
15415
+ var value = obj[key];
15416
+ if (value === "") {
15417
+ obj[key] = null;
15418
+ return;
15419
+ }
15420
+ if (typeof value === "string" && /^\d{4}-\d{2}-\d{2}$/.test(value)) {
15421
+ var date = new Date(value + "T00:00:00");
15422
+ obj[key] = isNaN(date.getTime()) ? null : date;
15423
+ return;
15424
+ }
15425
+ if (typeof value === "string" && /^\d{4}-\d{2}-\d{2}T/.test(value)) {
15426
+ var date = new Date(value);
15427
+ obj[key] = isNaN(date.getTime()) ? null : date;
15428
+ return;
15429
+ }
15430
+ if (value && typeof value === "object") {
15431
+ _this.normalizeDraft(value);
15432
+ }
15433
+ });
15434
+ return obj;
15435
+ };
15436
+ return DependentDraft;
15437
+ }());
15438
+
15390
15439
  function validateDate(dateS, format) {
15391
15440
  if (format === void 0) { format = "DD/MM/YYYY"; }
15392
- return moment$p(dateS, format).toDate();
15441
+ return moment$q(dateS, format).toDate();
15393
15442
  }
15394
15443
  function mapFormToDependentSave(ef, employeeId, dependentId, personId, dateFormat) {
15395
15444
  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;
@@ -15401,7 +15450,7 @@ function mapFormToDependentSave(ef, employeeId, dependentId, personId, dateForma
15401
15450
  nickname: ((_c = ef === null || ef === void 0 ? void 0 : ef.basicDependentPersonData) === null || _c === void 0 ? void 0 : _c.nickname) || "",
15402
15451
  genderType: ((_d = ef === null || ef === void 0 ? void 0 : ef.basicDependentPersonData) === null || _d === void 0 ? void 0 : _d.genderType) || null,
15403
15452
  birthDate: ((_e = ef === null || ef === void 0 ? void 0 : ef.basicDependentPersonData) === null || _e === void 0 ? void 0 : _e.birthDate) ?
15404
- moment$p(validateDate((_f = ef === null || ef === void 0 ? void 0 : ef.basicDependentPersonData) === null || _f === void 0 ? void 0 : _f.birthDate, dateFormat)).format(dateFormatToSave) : null,
15453
+ 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,
15405
15454
  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) || "",
15406
15455
  kinshipDependentDegreeType: ((_j = ef === null || ef === void 0 ? void 0 : ef.complementDependentPersonData) === null || _j === void 0 ? void 0 : _j.kinshipDependentDegreeType) || null,
15407
15456
  kinshipDegreeType: ((_k = ef === null || ef === void 0 ? void 0 : ef.complementDependentPersonData) === null || _k === void 0 ? void 0 : _k.kinshipDegreeType) || null,
@@ -15420,10 +15469,10 @@ function mapFormToDependentSave(ef, employeeId, dependentId, personId, dateForma
15420
15469
  rgIssuer: ((_x = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _x === void 0 ? void 0 : _x.rgIssuer) || "",
15421
15470
  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,
15422
15471
  rgIssueDate: ((_2 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _2 === void 0 ? void 0 : _2.rgIssueDate) ?
15423
- moment$p(validateDate((_3 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _3 === void 0 ? void 0 : _3.rgIssueDate, dateFormat)).format(dateFormatToSave) : null,
15472
+ 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,
15424
15473
  civilCertificateType: ((_4 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _4 === void 0 ? void 0 : _4.civilCertificateType) || null,
15425
15474
  civilCertificateIssueDate: ((_5 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _5 === void 0 ? void 0 : _5.civilCertificateIssueDate) ?
15426
- moment$p(validateDate((_6 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _6 === void 0 ? void 0 : _6.civilCertificateIssueDate, dateFormat)).format(dateFormatToSave) : null,
15475
+ 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,
15427
15476
  civilCertificateRegisterNumber: ((_7 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _7 === void 0 ? void 0 : _7.civilCertificateRegisterNumber) || "",
15428
15477
  civilCertificateTerm: ((_8 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _8 === void 0 ? void 0 : _8.civilCertificateTerm) || "",
15429
15478
  civilCertificateBook: ((_9 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _9 === void 0 ? void 0 : _9.civilCertificateBook) || "",
@@ -15431,7 +15480,7 @@ function mapFormToDependentSave(ef, employeeId, dependentId, personId, dateForma
15431
15480
  civilCertificateNotaryOffice: ((_11 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _11 === void 0 ? void 0 : _11.civilCertificateNotaryOffice) || "",
15432
15481
  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,
15433
15482
  deathCertificateIssueDate: ((_16 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _16 === void 0 ? void 0 : _16.deathCertificateIssueDate) ?
15434
- moment$p(validateDate((_17 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _17 === void 0 ? void 0 : _17.deathCertificateIssueDate, dateFormat)).format(dateFormatToSave) : null,
15483
+ 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,
15435
15484
  deathCertificateRegisterNumber: ((_18 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _18 === void 0 ? void 0 : _18.deathCertificateRegisterNumber) || "",
15436
15485
  deathCertificateNumber: ((_19 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _19 === void 0 ? void 0 : _19.deathCertificateNumber) || ""
15437
15486
  };
@@ -15454,7 +15503,7 @@ function mapPersonRetrieveToEmployeeDependentForm(data, employeeId, dateFormat)
15454
15503
  fullName: personRetrieve.basicData.fullName,
15455
15504
  nickname: personRetrieve.basicData.nickname || null,
15456
15505
  genderType: personRetrieve.basicData.genderType,
15457
- birthDate: ((_a = personRetrieve.basicData) === null || _a === void 0 ? void 0 : _a.birthDate) && moment$p((_b = personRetrieve.basicData) === null || _b === void 0 ? void 0 : _b.birthDate).format(dateFormat),
15506
+ 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),
15458
15507
  email: Array.isArray((_c = personRetrieve.emailData) === null || _c === void 0 ? void 0 : _c.email) ?
15459
15508
  personRetrieve.emailData.email.join(", ") : ((_d = personRetrieve.emailData) === null || _d === void 0 ? void 0 : _d.email) || null,
15460
15509
  };
@@ -15475,16 +15524,16 @@ function mapPersonRetrieveToEmployeeDependentForm(data, employeeId, dateFormat)
15475
15524
  rgNumber: ((_u = personRetrieve.nationalityData) === null || _u === void 0 ? void 0 : _u.rgNumber) || null,
15476
15525
  rgIssuer: ((_v = personRetrieve.nationalityData) === null || _v === void 0 ? void 0 : _v.rgIssuer) || null,
15477
15526
  rgIssuerStateId: ((_w = personRetrieve.nationalityData) === null || _w === void 0 ? void 0 : _w.rgIssuerState) ? __assign(__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 }) : {},
15478
- rgIssueDate: ((_3 = personRetrieve.nationalityData) === null || _3 === void 0 ? void 0 : _3.rgIssueDate) && moment$p((_4 = personRetrieve.nationalityData) === null || _4 === void 0 ? void 0 : _4.rgIssueDate).format("L"),
15527
+ 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"),
15479
15528
  civilCertificateType: ((_5 = personRetrieve.additionalData) === null || _5 === void 0 ? void 0 : _5.civilCertificateType) || "",
15480
- civilCertificateIssueDate: ((_6 = personRetrieve.additionalData) === null || _6 === void 0 ? void 0 : _6.civilCertificateIssueDate) && moment$p((_7 = personRetrieve.additionalData) === null || _7 === void 0 ? void 0 : _7.civilCertificateIssueDate).format("L"),
15529
+ 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"),
15481
15530
  civilCertificateRegisterNumber: ((_8 = personRetrieve.additionalData) === null || _8 === void 0 ? void 0 : _8.civilCertificateRegisterNumber) || "",
15482
15531
  civilCertificateTerm: ((_9 = personRetrieve.additionalData) === null || _9 === void 0 ? void 0 : _9.civilCertificateTerm) || "",
15483
15532
  civilCertificateBook: ((_10 = personRetrieve.additionalData) === null || _10 === void 0 ? void 0 : _10.civilCertificateBook) || "",
15484
15533
  civilCertificatePage: ((_11 = personRetrieve.additionalData) === null || _11 === void 0 ? void 0 : _11.civilCertificatePage) || "",
15485
15534
  civilCertificateNotaryOffice: ((_12 = personRetrieve.additionalData) === null || _12 === void 0 ? void 0 : _12.civilCertificateNotaryOffice) || "",
15486
15535
  civilCertificateStateId: ((_13 = personRetrieve.additionalData) === null || _13 === void 0 ? void 0 : _13.civilCertificateState) ? __assign(__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 }) : {},
15487
- deathCertificateIssueDate: ((_19 = personRetrieve.additionalData) === null || _19 === void 0 ? void 0 : _19.deathCertificateIssueDate) && moment$p((_20 = personRetrieve.additionalData) === null || _20 === void 0 ? void 0 : _20.deathCertificateIssueDate).format("L"),
15536
+ 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"),
15488
15537
  deathCertificateRegisterNumber: ((_21 = personRetrieve.additionalData) === null || _21 === void 0 ? void 0 : _21.deathCertificateRegisterNumber) || "",
15489
15538
  deathCertificateNumber: ((_22 = personRetrieve.additionalData) === null || _22 === void 0 ? void 0 : _22.deathCertificateNumber) || ""
15490
15539
  };
@@ -15501,18 +15550,21 @@ function mapPersonRetrieveToEmployeeDependentForm(data, employeeId, dateFormat)
15501
15550
  }
15502
15551
 
15503
15552
  var EmployeeDependentFormComponent = /** @class */ (function () {
15504
- function EmployeeDependentFormComponent(translateService, employeeDependentService, sUrlService, focusService, route, confirmationService, messageService) {
15553
+ function EmployeeDependentFormComponent(translateService, employeeDependentService, sUrlService, focusService, dependentDraftService, route, confirmationService, messageService) {
15505
15554
  this.translateService = translateService;
15506
15555
  this.employeeDependentService = employeeDependentService;
15507
15556
  this.sUrlService = sUrlService;
15508
15557
  this.focusService = focusService;
15558
+ this.dependentDraftService = dependentDraftService;
15509
15559
  this.route = route;
15510
15560
  this.confirmationService = confirmationService;
15511
15561
  this.messageService = messageService;
15512
15562
  this.loading = false;
15513
15563
  this.showSideBar = false;
15514
15564
  this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.employee_dependent_button_next");
15515
- this.formGroup = new FormGroup({});
15565
+ this.formGroup = new FormGroup({
15566
+ draftId: new FormControl(null),
15567
+ });
15516
15568
  this.ngUnsubscribe = new Subject();
15517
15569
  this.createSteps();
15518
15570
  }
@@ -15530,29 +15582,135 @@ var EmployeeDependentFormComponent = /** @class */ (function () {
15530
15582
  this.localeConfig = data.localeConfig;
15531
15583
  this.dateFormat = DateValidator.getDateFormatFromCalendar(data.localeConfig.calendar);
15532
15584
  };
15585
+ EmployeeDependentFormComponent.prototype.undoStep = function () {
15586
+ if (this.activeIndex === 1) {
15587
+ this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.employee_dependent_button_next");
15588
+ }
15589
+ else if (this.activeIndex === 0) {
15590
+ return;
15591
+ }
15592
+ this.activeIndex--;
15593
+ };
15594
+ EmployeeDependentFormComponent.prototype.nextStep = function () {
15595
+ if (this.activeIndex === 0) {
15596
+ var formBasicStep = this.formGroup.get("basicDependentPersonData");
15597
+ this.validateAllFormFields(formBasicStep);
15598
+ if (!formBasicStep.valid && !this.dependentId) {
15599
+ this.steps[1].disabled = true;
15600
+ return this.messageService.add({
15601
+ severity: "error",
15602
+ summary: this.translateService.instant("hcm_contract.employment_contract.error"),
15603
+ detail: this.translateService.instant("hcm_contract.employment_contract.admission_generic_invalid_form_group"),
15604
+ });
15605
+ }
15606
+ this.steps[1].disabled = false;
15607
+ this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.admission_employee_form_btn_step_last");
15608
+ this.activeIndex++;
15609
+ }
15610
+ else if (this.activeIndex === 1) {
15611
+ this.validateAllFormFields(this.formGroup);
15612
+ if (!this.formGroup.valid) {
15613
+ var msg = this.requiredFieldsStep1 ? this.translateService.instant("hcm_contract.employment_contract.admission_generic_invalid_form_group_step_1")
15614
+ : this.translateService.instant("hcm_contract.employment_contract.admission_generic_invalid_form_group");
15615
+ return this.messageService.add({
15616
+ severity: "error",
15617
+ summary: this.translateService.instant("hcm_contract.employment_contract.error"),
15618
+ detail: msg,
15619
+ });
15620
+ }
15621
+ if (this.dependentId) {
15622
+ this.onBeforeSave();
15623
+ }
15624
+ else {
15625
+ this.onSaveDependent();
15626
+ }
15627
+ }
15628
+ };
15629
+ EmployeeDependentFormComponent.prototype.isNew = function () {
15630
+ return !this.dependentId;
15631
+ };
15632
+ EmployeeDependentFormComponent.prototype.isNewToLabel = function () {
15633
+ return this.isNew() ? "create" : "edit";
15634
+ };
15635
+ EmployeeDependentFormComponent.prototype.onStepSelected = function (event) {
15636
+ if (event.index === 0) {
15637
+ var complementForm = this.formGroup.get("complementDependentPersonData");
15638
+ if (!complementForm.valid && (!this.dependentId)) {
15639
+ this.validateAllFormFields(complementForm);
15640
+ return;
15641
+ }
15642
+ this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.employee_dependent_button_next");
15643
+ }
15644
+ if (event.index === 1) {
15645
+ var basicForm = this.formGroup.get("basicDependentPersonData");
15646
+ if (!basicForm.valid && (!this.dependentId)) {
15647
+ this.validateAllFormFields(basicForm);
15648
+ return;
15649
+ }
15650
+ }
15651
+ this.activeIndex = event.index;
15652
+ };
15653
+ EmployeeDependentFormComponent.prototype.onCancel = function () {
15654
+ this.showSideBar = false;
15655
+ };
15656
+ EmployeeDependentFormComponent.prototype.saveDependentDraft = function () {
15657
+ var _this = this;
15658
+ validateSpecificControls(this.formGroup, [
15659
+ "basicDependentPersonData.fullName",
15660
+ "complementDependentPersonData.kinshipDependentDegreeType",
15661
+ ]);
15662
+ var fullName = this.formGroup.get("basicDependentPersonData.fullName");
15663
+ var kinshipDependentDegreeType = this.formGroup.get("complementDependentPersonData.kinshipDependentDegreeType");
15664
+ if ((this.activeIndex === 0 && !fullName.valid)
15665
+ || (this.activeIndex === 1 && !kinshipDependentDegreeType.valid)) {
15666
+ return;
15667
+ }
15668
+ else if (fullName.valid && this.activeIndex === 0) {
15669
+ this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.admission_employee_form_btn_step_last");
15670
+ return this.activeIndex++;
15671
+ }
15672
+ this.loading = true;
15673
+ this.getSaveObservable()
15674
+ .pipe(takeUntil(this.ngUnsubscribe), finalize(function () { return _this.loading = false; }))
15675
+ .subscribe(function (res) {
15676
+ _this.formGroup.get("draftId").setValue(res === null || res === void 0 ? void 0 : res.id);
15677
+ _this.messageService.add({
15678
+ severity: "success",
15679
+ summary: _this.translateService.instant("hcm_contract.employment_contract.admission_generic_toast_success"),
15680
+ detail: _this.translateService.instant("hcm_contract.employment_contract.admission_draft_employee_form_save_sucess"),
15681
+ });
15682
+ _this.showSideBar = false;
15683
+ _this.closeSideBar.emit(true);
15684
+ });
15685
+ };
15533
15686
  EmployeeDependentFormComponent.prototype.subscribeEvents = function () {
15534
15687
  var _this = this;
15535
15688
  this.employeeDependentService.getOpenSideBarAndStartForm()
15689
+ .pipe(takeUntil(this.ngUnsubscribe))
15536
15690
  .subscribe(function (data) {
15537
15691
  _this.activeIndex = 0;
15538
15692
  _this.buttonLabel = _this.translateService.instant("hcm_contract.employment_contract.employee_dependent_button_next");
15539
15693
  _this.dependentId = data === null || data === void 0 ? void 0 : data.dependentId;
15540
15694
  _this.personId = data === null || data === void 0 ? void 0 : data.personId;
15541
15695
  _this.formGroup.reset();
15542
- if (!(data === null || data === void 0 ? void 0 : data.dependentId)) {
15696
+ if (!(data === null || data === void 0 ? void 0 : data.dependentId) && !data.dependentDraftId) {
15543
15697
  _this.steps[1].disabled = true;
15544
15698
  _this.formGroup.enable();
15545
15699
  if (data.personId) {
15546
15700
  _this.personRetrieveInformation();
15547
15701
  }
15548
15702
  }
15549
- else {
15703
+ else if ((data === null || data === void 0 ? void 0 : data.personId) && !data.dependentDraftId) {
15550
15704
  _this.personRetrieveInformation();
15551
15705
  _this.steps[0].disabled = false;
15552
15706
  _this.steps[1].disabled = false;
15553
15707
  }
15708
+ else if (data === null || data === void 0 ? void 0 : data.dependentDraftId) {
15709
+ _this.loadDraft(data.dependentDraftId);
15710
+ }
15554
15711
  _this.showSideBar = true;
15555
15712
  });
15713
+ this.onSaveByListDraft();
15556
15714
  };
15557
15715
  EmployeeDependentFormComponent.prototype.createSteps = function () {
15558
15716
  var personalData = {
@@ -15594,13 +15752,29 @@ var EmployeeDependentFormComponent = /** @class */ (function () {
15594
15752
  .pipe(takeUntil(this.ngUnsubscribe), finalize(function () {
15595
15753
  _this.loading = false;
15596
15754
  })).subscribe(function (data) {
15755
+ var _a;
15756
+ var draftId = (_a = _this.formGroup.get("draftId")) === null || _a === void 0 ? void 0 : _a.value;
15597
15757
  if (data === null || data === void 0 ? void 0 : data.id) {
15598
15758
  _this.addMessageSucess();
15599
15759
  _this.showSideBar = false;
15600
15760
  _this.closeSideBar.emit(true);
15761
+ if (draftId) {
15762
+ _this.deleteDraft(draftId);
15763
+ }
15601
15764
  }
15602
15765
  });
15603
15766
  };
15767
+ EmployeeDependentFormComponent.prototype.deleteDraft = function (draftId) {
15768
+ var _this = this;
15769
+ this.loading = true;
15770
+ this.dependentDraftService.delete(draftId)
15771
+ .pipe(takeUntil(this.ngUnsubscribe), finalize(function () {
15772
+ _this.loading = false;
15773
+ }))
15774
+ .subscribe(function () {
15775
+ _this.closeSideBar.emit(true);
15776
+ });
15777
+ };
15604
15778
  EmployeeDependentFormComponent.prototype.addMessageSucess = function () {
15605
15779
  this.messageService.add({
15606
15780
  severity: "success",
@@ -15621,47 +15795,9 @@ var EmployeeDependentFormComponent = /** @class */ (function () {
15621
15795
  });
15622
15796
  this.focusService.focusFirstInvalidInput();
15623
15797
  };
15624
- EmployeeDependentFormComponent.prototype.undoStep = function () {
15625
- if (this.activeIndex === 1) {
15626
- this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.employee_dependent_button_next");
15627
- }
15628
- else if (this.activeIndex === 0) {
15629
- return;
15630
- }
15631
- this.activeIndex--;
15632
- };
15633
- EmployeeDependentFormComponent.prototype.nextStep = function () {
15634
- if (this.activeIndex === 0) {
15635
- var formBasicStep = this.formGroup.get("basicDependentPersonData");
15636
- this.validateAllFormFields(formBasicStep);
15637
- if (!formBasicStep.valid && !this.dependentId) {
15638
- this.steps[1].disabled = true;
15639
- return this.messageService.add({
15640
- severity: "error",
15641
- summary: this.translateService.instant("hcm_contract.employment_contract.error"),
15642
- detail: this.translateService.instant("hcm_contract.employment_contract.admission_generic_invalid_form_group"),
15643
- });
15644
- }
15645
- this.steps[1].disabled = false;
15646
- this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.save");
15647
- this.activeIndex++;
15648
- }
15649
- else if (this.activeIndex === 1) {
15650
- this.validateAllFormFields(this.formGroup);
15651
- if (!this.formGroup.valid) {
15652
- return this.messageService.add({
15653
- severity: "error",
15654
- summary: this.translateService.instant("hcm_contract.employment_contract.error"),
15655
- detail: this.translateService.instant("hcm_contract.employment_contract.admission_generic_invalid_form_group"),
15656
- });
15657
- }
15658
- if (this.dependentId) {
15659
- this.onBeforeSave();
15660
- }
15661
- else {
15662
- this.onSaveDependent();
15663
- }
15664
- }
15798
+ EmployeeDependentFormComponent.prototype.requiredFieldsStep1 = function () {
15799
+ var _a, _b, _c, _d;
15800
+ 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);
15665
15801
  };
15666
15802
  EmployeeDependentFormComponent.prototype.isFormChanged = function (beforeData, afterData) {
15667
15803
  if (!(beforeData === null || beforeData === void 0 ? void 0 : beforeData.personDependentData) || !afterData) {
@@ -15670,7 +15806,7 @@ var EmployeeDependentFormComponent = /** @class */ (function () {
15670
15806
  var keysToCheck = [
15671
15807
  "basicDependentPersonData",
15672
15808
  "complementDependentPersonData",
15673
- "documentDependentPersonData"
15809
+ "documentDependentPersonData",
15674
15810
  ];
15675
15811
  return keysToCheck.some(function (formGroup) {
15676
15812
  return Object.keys(beforeData.personDependentData[formGroup] || {}).some(function (key) {
@@ -15681,33 +15817,6 @@ var EmployeeDependentFormComponent = /** @class */ (function () {
15681
15817
  });
15682
15818
  });
15683
15819
  };
15684
- EmployeeDependentFormComponent.prototype.isNew = function () {
15685
- return !this.dependentId;
15686
- };
15687
- EmployeeDependentFormComponent.prototype.isNewToLabel = function () {
15688
- return this.isNew() ? "create" : "edit";
15689
- };
15690
- EmployeeDependentFormComponent.prototype.onStepSelected = function (event) {
15691
- if (event.index === 0) {
15692
- var complementForm = this.formGroup.get("complementDependentPersonData");
15693
- if (!complementForm.valid && (!this.dependentId)) {
15694
- this.validateAllFormFields(complementForm);
15695
- return;
15696
- }
15697
- this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.employee_dependent_button_next");
15698
- }
15699
- if (event.index === 1) {
15700
- var basicForm = this.formGroup.get("basicDependentPersonData");
15701
- if (!basicForm.valid && (!this.dependentId)) {
15702
- this.validateAllFormFields(basicForm);
15703
- return;
15704
- }
15705
- }
15706
- this.activeIndex = event.index;
15707
- };
15708
- EmployeeDependentFormComponent.prototype.onCancel = function () {
15709
- this.showSideBar = false;
15710
- };
15711
15820
  EmployeeDependentFormComponent.prototype.onBeforeSave = function () {
15712
15821
  var _this = this;
15713
15822
  if (!this.formGroup.dirty || !this.isFormChanged(this.loadedDependent, this.formGroup.getRawValue())) {
@@ -15728,11 +15837,53 @@ var EmployeeDependentFormComponent = /** @class */ (function () {
15728
15837
  this.closeSideBar.emit(true);
15729
15838
  this.addMessageSucess();
15730
15839
  };
15840
+ EmployeeDependentFormComponent.prototype.loadDraft = function (draftId) {
15841
+ var _this = this;
15842
+ this.loading = true;
15843
+ this.dependentDraftService.get(draftId)
15844
+ .pipe(takeUntil(this.ngUnsubscribe), finalize(function () {
15845
+ _this.loading = false;
15846
+ }))
15847
+ .subscribe(function (draft) {
15848
+ var _a;
15849
+ (_a = _this.formGroup.get("draftId")) === null || _a === void 0 ? void 0 : _a.setValue(draftId);
15850
+ var data = DependentDraft.fromDto(draft);
15851
+ _this.formGroup.patchValue(data);
15852
+ });
15853
+ };
15854
+ EmployeeDependentFormComponent.prototype.getSaveObservable = function () {
15855
+ var _a;
15856
+ var form = this.formGroup.getRawValue();
15857
+ var dto = DependentDraft.toDto(form, this.employeeId, this.admissionDraft);
15858
+ var observable;
15859
+ var id = (_a = this.formGroup.get("draftId")) === null || _a === void 0 ? void 0 : _a.value;
15860
+ if (id) {
15861
+ observable = this.dependentDraftService.update(id, dto);
15862
+ }
15863
+ else {
15864
+ observable = this.dependentDraftService.insert(dto);
15865
+ }
15866
+ return observable;
15867
+ };
15868
+ EmployeeDependentFormComponent.prototype.onSaveByListDraft = function () {
15869
+ var _this = this;
15870
+ this.dependentDraftService.saveDraftEvent
15871
+ .pipe(takeUntil(this.ngUnsubscribe))
15872
+ .subscribe(function (formData) {
15873
+ _this.loading = true;
15874
+ if (formData) {
15875
+ var data = DependentDraft.fromDto(formData);
15876
+ _this.formGroup.patchValue(data);
15877
+ _this.onSaveDependent();
15878
+ }
15879
+ });
15880
+ };
15731
15881
  EmployeeDependentFormComponent.ctorParameters = function () { return [
15732
15882
  { type: TranslateService },
15733
15883
  { type: EmployeeDependentService },
15734
15884
  { type: SUrlService },
15735
15885
  { type: FocusService },
15886
+ { type: DependentDraftService },
15736
15887
  { type: ActivatedRoute },
15737
15888
  { type: ConfirmationService },
15738
15889
  { type: MessageService }
@@ -15740,6 +15891,9 @@ var EmployeeDependentFormComponent = /** @class */ (function () {
15740
15891
  __decorate([
15741
15892
  Input()
15742
15893
  ], EmployeeDependentFormComponent.prototype, "employeeId", void 0);
15894
+ __decorate([
15895
+ Input()
15896
+ ], EmployeeDependentFormComponent.prototype, "admissionDraft", void 0);
15743
15897
  __decorate([
15744
15898
  Input()
15745
15899
  ], EmployeeDependentFormComponent.prototype, "closeSideBar", void 0);
@@ -15747,7 +15901,7 @@ var EmployeeDependentFormComponent = /** @class */ (function () {
15747
15901
  Component({
15748
15902
  // tslint:disable-next-line:component-selector
15749
15903
  selector: "fnd-employee-dependent-form",
15750
- 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\" *sLoadingState=\"loading\">\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\n class=\"btn-next\"\n iconClass=\"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",
15904
+ 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",
15751
15905
  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}"]
15752
15906
  })
15753
15907
  ], EmployeeDependentFormComponent);
@@ -15760,7 +15914,7 @@ var EnumTipSex;
15760
15914
  EnumTipSex["VM"] = "VM";
15761
15915
  })(EnumTipSex || (EnumTipSex = {}));
15762
15916
 
15763
- var moment$n = moment$p; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
15917
+ var moment$n = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
15764
15918
  var EmployeeDependentPersonalStepComponent = /** @class */ (function () {
15765
15919
  function EmployeeDependentPersonalStepComponent(translateService, route, formBuilder, service) {
15766
15920
  var _this = this;
@@ -15849,7 +16003,226 @@ var EmployeeDependentPersonalStepComponent = /** @class */ (function () {
15849
16003
  return EmployeeDependentPersonalStepComponent;
15850
16004
  }());
15851
16005
 
15852
- var moment$o = moment$p;
16006
+ var moment$o = moment$q;
16007
+ var DependentListDraftComponent = /** @class */ (function () {
16008
+ function DependentListDraftComponent(activatedRoute, paginatorStorageService, dependentDraftService, translate, router, confirmationService, messageService) {
16009
+ this.activatedRoute = activatedRoute;
16010
+ this.paginatorStorageService = paginatorStorageService;
16011
+ this.dependentDraftService = dependentDraftService;
16012
+ this.translate = translate;
16013
+ this.router = router;
16014
+ this.confirmationService = confirmationService;
16015
+ this.messageService = messageService;
16016
+ this.isLoading = false;
16017
+ this.allPermissions = {};
16018
+ this.currentListParams = { page: 0, size: 10, sort: [] };
16019
+ this.permissions = {};
16020
+ this.closeSideBar = new EventEmitter();
16021
+ this.addButtonClicked = new EventEmitter();
16022
+ this.onEdit = new EventEmitter();
16023
+ this.ngUnsubscribe = new Subject();
16024
+ }
16025
+ DependentListDraftComponent.prototype.ngOnInit = function () {
16026
+ var _this = this;
16027
+ this.gridColumns = this.getGridColumns();
16028
+ this.activatedRoute
16029
+ .data.pipe(takeUntil(this.ngUnsubscribe)).subscribe(function (data) { return _this.onRouteDataChange(data); });
16030
+ this.closeSideBar
16031
+ .pipe(takeUntil(this.ngUnsubscribe), filter(function (value) { return !!value; }))
16032
+ .subscribe(function () {
16033
+ _this.updateGrid();
16034
+ });
16035
+ };
16036
+ DependentListDraftComponent.prototype.ngOnDestroy = function () {
16037
+ this.ngUnsubscribe.next();
16038
+ this.ngUnsubscribe.complete();
16039
+ };
16040
+ DependentListDraftComponent.prototype.onRouteDataChange = function (data) {
16041
+ var _a;
16042
+ this.allPermissions = data.allPermissions;
16043
+ this.permissions = (_a = data.allPermissions) === null || _a === void 0 ? void 0 : _a.dependentDraft;
16044
+ };
16045
+ DependentListDraftComponent.prototype.getActions = function (data) {
16046
+ var _this = this;
16047
+ return [
16048
+ {
16049
+ id: "1",
16050
+ label: this.translate.instant("hcm_contract.employment_contract.admission_generic_edit"),
16051
+ visible: this.permissions.editar,
16052
+ command: function () {
16053
+ _this.onEdit.emit(data === null || data === void 0 ? void 0 : data.id);
16054
+ },
16055
+ },
16056
+ {
16057
+ id: "2",
16058
+ visible: this.permissions.excluir,
16059
+ label: this.translate.instant("hcm_contract.employment_contract.logical_delete"),
16060
+ command: function () { return _this.onDelete(data.id); },
16061
+ },
16062
+ {
16063
+ id: "3",
16064
+ visible: this.permissions.incluir,
16065
+ label: this.translate.instant("hcm_contract.employment_contract.dependent_draft_effect_data"),
16066
+ command: function () {
16067
+ _this.dependentDraftService.saveDraftEvent.next(data);
16068
+ },
16069
+ },
16070
+ ];
16071
+ };
16072
+ DependentListDraftComponent.prototype.onDelete = function (id) {
16073
+ var _this = this;
16074
+ this.confirmationService.confirm({
16075
+ header: this.translate.instant("hcm_contract.employment_contract.draft_delete_confirmation_message"),
16076
+ message: this.translate.instant("hcm_contract.employment_contract.admission_delete_confirmation_message"),
16077
+ acceptLabel: this.translate.instant("hcm_contract.employment_contract.admission_generic_yes"),
16078
+ rejectLabel: this.translate.instant("hcm_contract.employment_contract.admission_generic_no"),
16079
+ accept: function () {
16080
+ _this.isLoading = true;
16081
+ _this.dependentDraftService.delete(id)
16082
+ .pipe(takeUntil(_this.ngUnsubscribe), finalize(function () {
16083
+ _this.isLoading = false;
16084
+ _this.resetGrid();
16085
+ }))
16086
+ .subscribe(function () {
16087
+ _this.messageService.add({
16088
+ severity: "success",
16089
+ summary: _this.translate.instant("hcm_contract.employment_contract.deleted_message_title"),
16090
+ detail: _this.translate.instant("hcm_contract.employment_contract.deleted_message_content"),
16091
+ });
16092
+ });
16093
+ },
16094
+ });
16095
+ };
16096
+ DependentListDraftComponent.prototype.getSortField = function () {
16097
+ return this.currentListParams.sort;
16098
+ };
16099
+ DependentListDraftComponent.prototype.getPageSize = function () {
16100
+ return this.currentListParams.size;
16101
+ };
16102
+ DependentListDraftComponent.prototype.getRowIndex = function () {
16103
+ return this.currentListParams.page * this.currentListParams.size;
16104
+ };
16105
+ DependentListDraftComponent.prototype.formatDate = function (date) {
16106
+ return moment$o(date).format(this.dateFormat);
16107
+ };
16108
+ DependentListDraftComponent.prototype.onGridChange = function (event) {
16109
+ var size = event.rows;
16110
+ var page = event.first / size;
16111
+ var sort = event.multiSortMeta;
16112
+ if (size !== 10 || page !== 0 || (sort === null || sort === void 0 ? void 0 : sort.length) > 0) {
16113
+ this.paginatorStorageService.storePaginator("DependentDraftListComponentPaginator", {
16114
+ page: page,
16115
+ size: size,
16116
+ sort: sort,
16117
+ });
16118
+ }
16119
+ return this.updateGrid({ page: page, size: size, sort: sort });
16120
+ };
16121
+ DependentListDraftComponent.prototype.resetGrid = function (listParams) {
16122
+ if (listParams) {
16123
+ this.currentListParams = __assign(__assign({}, this.currentListParams), listParams);
16124
+ }
16125
+ this.currentListParams = __assign(__assign({}, this.currentListParams), { page: 0, sort: [] });
16126
+ this.table.reset();
16127
+ };
16128
+ DependentListDraftComponent.prototype.getGridColumns = function () {
16129
+ var gridColumnsGeneral = [
16130
+ {
16131
+ field: "personName",
16132
+ header: this.translate.instant("hcm_contract.employment_contract.e_001_pes_nom_pes"),
16133
+ },
16134
+ {
16135
+ field: "kinshipDegreeType",
16136
+ header: this.translate.instant("hcm_contract.employment_contract.employee_dependent_list_kinship"),
16137
+ }
16138
+ ];
16139
+ return gridColumnsGeneral;
16140
+ };
16141
+ DependentListDraftComponent.prototype.updateGrid = function (listParams) {
16142
+ var _this = this;
16143
+ if (listParams === void 0) { listParams = {}; }
16144
+ if (!this._admissionDraftId && !this._employeeId) {
16145
+ return;
16146
+ }
16147
+ this.isLoading = true;
16148
+ this.currentListParams = __assign(__assign({}, this.currentListParams), listParams);
16149
+ var _a = this.currentListParams, page = _a.page, size = _a.size;
16150
+ var sort = this.currentListParams.sort;
16151
+ var displayFields = ["*"];
16152
+ var filterQuery = this._employeeId ? "(employee.id eq '" + this._employeeId + "')" : "(admissionDraft.id eq '" + this._admissionDraftId + "')";
16153
+ if (!sort) {
16154
+ sort = [{ field: "lastModifiedDate", order: -1 }];
16155
+ }
16156
+ this.dependentDraftService
16157
+ .list({ page: page, size: size, sort: sort, filterQuery: filterQuery, displayFields: displayFields })
16158
+ .pipe(takeUntil(this.ngUnsubscribe), debounceTime(500), distinctUntilChanged(), finalize(function () {
16159
+ _this.isLoading = false;
16160
+ }))
16161
+ .subscribe(function (list) {
16162
+ _this.gridData = list.contents;
16163
+ _this.totalRecords = list.totalElements;
16164
+ });
16165
+ };
16166
+ DependentListDraftComponent.prototype.getProp = function (obj, path) {
16167
+ return path.split(".").reduce(function (result, prop) { return (result[prop] === undefined ? "" : result[prop]); }, obj);
16168
+ };
16169
+ Object.defineProperty(DependentListDraftComponent.prototype, "employeeId", {
16170
+ set: function (id) {
16171
+ this._employeeId = id;
16172
+ if (this._employeeId) {
16173
+ this.updateGrid();
16174
+ }
16175
+ },
16176
+ enumerable: true,
16177
+ configurable: true
16178
+ });
16179
+ Object.defineProperty(DependentListDraftComponent.prototype, "admissionDraftId", {
16180
+ set: function (id) {
16181
+ this._admissionDraftId = id;
16182
+ if (this._admissionDraftId) {
16183
+ this.updateGrid();
16184
+ }
16185
+ },
16186
+ enumerable: true,
16187
+ configurable: true
16188
+ });
16189
+ DependentListDraftComponent.ctorParameters = function () { return [
16190
+ { type: ActivatedRoute },
16191
+ { type: PaginatorStorageService },
16192
+ { type: DependentDraftService },
16193
+ { type: TranslateService },
16194
+ { type: Router },
16195
+ { type: ConfirmationService },
16196
+ { type: MessageService }
16197
+ ]; };
16198
+ __decorate([
16199
+ Input()
16200
+ ], DependentListDraftComponent.prototype, "closeSideBar", void 0);
16201
+ __decorate([
16202
+ Output()
16203
+ ], DependentListDraftComponent.prototype, "addButtonClicked", void 0);
16204
+ __decorate([
16205
+ Output()
16206
+ ], DependentListDraftComponent.prototype, "onEdit", void 0);
16207
+ __decorate([
16208
+ ViewChild("dependentDraftTable")
16209
+ ], DependentListDraftComponent.prototype, "table", void 0);
16210
+ __decorate([
16211
+ Input()
16212
+ ], DependentListDraftComponent.prototype, "employeeId", null);
16213
+ __decorate([
16214
+ Input()
16215
+ ], DependentListDraftComponent.prototype, "admissionDraftId", null);
16216
+ DependentListDraftComponent = __decorate([
16217
+ Component({
16218
+ selector: "app-dependent-list-draft",
16219
+ 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"
16220
+ })
16221
+ ], DependentListDraftComponent);
16222
+ return DependentListDraftComponent;
16223
+ }());
16224
+
16225
+ var moment$p = moment$q;
15853
16226
  var EmployeeDependentListComponent = /** @class */ (function () {
15854
16227
  function EmployeeDependentListComponent(translate, fb, cdRef, focusService, paginatorStorageService, employeeDependentService, activatedRoute, confirmationService, messageService, router) {
15855
16228
  this.translate = translate;
@@ -15883,6 +16256,13 @@ var EmployeeDependentListComponent = /** @class */ (function () {
15883
16256
  enumerable: true,
15884
16257
  configurable: true
15885
16258
  });
16259
+ Object.defineProperty(EmployeeDependentListComponent.prototype, "admissionDraftId", {
16260
+ set: function (id) {
16261
+ this._admissionDraftId = id;
16262
+ },
16263
+ enumerable: true,
16264
+ configurable: true
16265
+ });
15886
16266
  EmployeeDependentListComponent.prototype.ngAfterViewChecked = function () {
15887
16267
  this.cdRef.detectChanges();
15888
16268
  };
@@ -16005,13 +16385,13 @@ var EmployeeDependentListComponent = /** @class */ (function () {
16005
16385
  return name + " eq " + value;
16006
16386
  }
16007
16387
  else if (type === FieldType.Date) {
16008
- return name + " eq '" + moment$o(value).format("YYYY-MM-DD") + "'";
16388
+ return name + " eq '" + moment$p(value).format("YYYY-MM-DD") + "'";
16009
16389
  }
16010
16390
  else if (type === FieldType.Time) {
16011
- return name + " eq '" + moment$o(value).format("HH:mm:ss") + "'";
16391
+ return name + " eq '" + moment$p(value).format("HH:mm:ss") + "'";
16012
16392
  }
16013
16393
  else if (type === FieldType.DateTime) {
16014
- return name + " eq '" + moment$o(value).format() + "'";
16394
+ return name + " eq '" + moment$p(value).format() + "'";
16015
16395
  }
16016
16396
  else if (type === FieldType.String) {
16017
16397
  return "containing(upper(" + name + "), upper('" + value.replace(/'/g, "\\'") + "'))";
@@ -16111,6 +16491,11 @@ var EmployeeDependentListComponent = /** @class */ (function () {
16111
16491
  personId: this.personId,
16112
16492
  });
16113
16493
  };
16494
+ EmployeeDependentListComponent.prototype.onEditDraft = function (draftId) {
16495
+ this.employeeDependentService.setOpenSideBarAndStartForm({
16496
+ dependentDraftId: draftId
16497
+ });
16498
+ };
16114
16499
  EmployeeDependentListComponent.prototype.getActions = function (rows) {
16115
16500
  var _this = this;
16116
16501
  return [
@@ -16176,6 +16561,9 @@ var EmployeeDependentListComponent = /** @class */ (function () {
16176
16561
  __decorate([
16177
16562
  Input()
16178
16563
  ], EmployeeDependentListComponent.prototype, "employeeId", null);
16564
+ __decorate([
16565
+ Input()
16566
+ ], EmployeeDependentListComponent.prototype, "admissionDraftId", null);
16179
16567
  __decorate([
16180
16568
  ViewChild("employeeDependentTable", { static: false })
16181
16569
  ], EmployeeDependentListComponent.prototype, "table", void 0);
@@ -16183,7 +16571,7 @@ var EmployeeDependentListComponent = /** @class */ (function () {
16183
16571
  Component({
16184
16572
  // tslint:disable-next-line:component-selector
16185
16573
  selector: "fnd-employee-dependent",
16186
- 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>",
16574
+ 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",
16187
16575
  styles: [".radio-buttons{display:flex;flex-direction:column;gap:6px}.person-label{display:flex;gap:5px;align-items:center}"]
16188
16576
  })
16189
16577
  ], EmployeeDependentListComponent);
@@ -16216,10 +16604,18 @@ var EmployeeDependentModule = /** @class */ (function () {
16216
16604
  domain: "hcm_contract",
16217
16605
  service: "employment_contract",
16218
16606
  }),
16607
+ PermissionsModule.forChild([
16608
+ {
16609
+ name: "dependentDraft",
16610
+ actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
16611
+ uri: "res://senior.com.br/hcm_contract/employment_contract/entities/dependentDraft",
16612
+ },
16613
+ ]),
16219
16614
  TooltipModule,
16220
16615
  ],
16221
16616
  declarations: [
16222
16617
  EmployeeDependentListComponent,
16618
+ DependentListDraftComponent,
16223
16619
  EmployeeDependentFormComponent,
16224
16620
  EmployeeDependentPersonalStepComponent,
16225
16621
  EmployeeDependentComplementStepComponent,
@@ -16228,7 +16624,8 @@ var EmployeeDependentModule = /** @class */ (function () {
16228
16624
  ],
16229
16625
  providers: [
16230
16626
  CountryService,
16231
- StateService
16627
+ StateService,
16628
+ DependentDraftService
16232
16629
  ],
16233
16630
  exports: [
16234
16631
  EmployeeDependentListComponent,
@@ -16246,5 +16643,5 @@ var EmployeeDependentModule = /** @class */ (function () {
16246
16643
  * Generated bundle index. Do not edit.
16247
16644
  */
16248
16645
 
16249
- 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, fallback, 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, verifyValidationsForm, ɵ0, EmployeeModule as ɵa, EntityService as ɵb, E070EmpService as ɵba, E070FilService as ɵbb, ClockingEventModule as ɵbc, EmployeeSummaryService as ɵbd, EmployeeDependentFormComponent as ɵbe, EmployeeDependentPersonalStepComponent as ɵbf, EmployeeDependentComplementStepComponent as ɵbg, EmployeeDependentComplementTabComponent as ɵbh, CountryService as ɵbi, EmployeeDependentDocumentTabComponent as ɵbj, StateService as ɵbk, 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 };
16646
+ 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 };
16250
16647
  //# sourceMappingURL=senior-gestao-pessoas-hcm-contract-employee-history.js.map