@senior-gestao-pessoas/hcm-contract-employee-history 5.5.2 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/senior-gestao-pessoas-hcm-contract-employee-history.umd.js +651 -251
- package/bundles/senior-gestao-pessoas-hcm-contract-employee-history.umd.js.map +1 -1
- package/bundles/senior-gestao-pessoas-hcm-contract-employee-history.umd.min.js +2 -2
- package/bundles/senior-gestao-pessoas-hcm-contract-employee-history.umd.min.js.map +1 -1
- package/core/dtos/employee-dependent-save-dto.d.ts +2 -1
- package/core/entities/dependent-draft/dependent-draft.d.ts +11 -0
- package/core/entities/dependent-draft/dependent-draft.dto.d.ts +13 -0
- package/core/entities/dependent-draft/dependent-draft.service.d.ts +13 -0
- package/esm2015/core/dtos/employee-dependent-save-dto.js +1 -1
- package/esm2015/core/entities/dependent-draft/dependent-draft.dto.js +1 -0
- package/esm2015/core/entities/dependent-draft/dependent-draft.js +56 -0
- package/esm2015/core/entities/dependent-draft/dependent-draft.service.js +26 -0
- package/esm2015/lib/employee-dependent/employee-dependent.module.js +14 -2
- package/esm2015/lib/employee-dependent/form/employee-dependent-form.component.js +179 -75
- package/esm2015/lib/employee-dependent/form/employee-dependent-personal-step/employee-dependent-personal-step.component.js +1 -1
- package/esm2015/lib/employee-dependent/list/draft/dependent-list-draft.component.js +216 -0
- package/esm2015/lib/employee-dependent/list/employee-dependent-list.component.js +13 -2
- package/esm2015/lib/utils/helpers.js +24 -1
- package/esm2015/public-api.js +1 -2
- package/esm2015/senior-gestao-pessoas-hcm-contract-employee-history.js +10 -8
- package/esm5/core/dtos/employee-dependent-save-dto.js +1 -1
- package/esm5/core/entities/dependent-draft/dependent-draft.dto.js +1 -0
- package/esm5/core/entities/dependent-draft/dependent-draft.js +61 -0
- package/esm5/core/entities/dependent-draft/dependent-draft.service.js +29 -0
- package/esm5/lib/employee-dependent/employee-dependent.module.js +14 -2
- package/esm5/lib/employee-dependent/form/employee-dependent-form.component.js +183 -75
- package/esm5/lib/employee-dependent/form/employee-dependent-personal-step/employee-dependent-personal-step.component.js +1 -1
- package/esm5/lib/employee-dependent/list/draft/dependent-list-draft.component.js +230 -0
- package/esm5/lib/employee-dependent/list/employee-dependent-list.component.js +17 -2
- package/esm5/lib/utils/helpers.js +24 -1
- package/esm5/public-api.js +1 -2
- package/esm5/senior-gestao-pessoas-hcm-contract-employee-history.js +10 -8
- package/fesm2015/senior-gestao-pessoas-hcm-contract-employee-history.js +612 -244
- package/fesm2015/senior-gestao-pessoas-hcm-contract-employee-history.js.map +1 -1
- package/fesm5/senior-gestao-pessoas-hcm-contract-employee-history.js +641 -244
- package/fesm5/senior-gestao-pessoas-hcm-contract-employee-history.js.map +1 -1
- package/lib/employee-dependent/form/employee-dependent-form.component.d.ts +16 -7
- package/lib/employee-dependent/list/draft/dependent-list-draft.component.d.ts +49 -0
- package/lib/employee-dependent/list/employee-dependent-list.component.d.ts +3 -0
- package/lib/utils/helpers.d.ts +11 -1
- package/package.json +1 -1
- package/public-api.d.ts +0 -1
- package/senior-gestao-pessoas-hcm-contract-employee-history.d.ts +9 -7
- package/senior-gestao-pessoas-hcm-contract-employee-history.metadata.json +1 -1
- package/esm2015/locale/fallback.js +0 -54
- package/esm5/locale/fallback.js +0 -54
- package/locale/fallback.d.ts +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@seniorsistemas/platform-components'), require('@angular/common/http'), require('primeng/api'), require('@ngx-translate/core'), require('rxjs'), require('rxjs/operators'), require('@seniorsistemas/angular-components'), require('moment'), require('@angular/forms'), require('@angular/router'), require('zone.js/dist/zone-error'), require('ngx-cookie-service'), require('@angular/common'), require('angular2-hotkeys'), require('ng2-currency-mask'), require('primeng/calendar'), require('primeng/confirmdialog'), require('primeng/dropdown'), require('primeng/inputmask'), require('primeng/inputswitch'), require('primeng/inputtext'), require('primeng/inputtextarea'), require('primeng/messages'), require('primeng/panel'), require('primeng/splitbutton'), require('primeng/table'), require('primeng/tabview'), require('primeng/toast'), require('primeng/togglebutton'), require('@seniorsistemas/senior-platform-data'), require('primeng/selectbutton'), require('@senior-gestao-pessoas/hcm-advanced-filter-general'), require('@seniorsistemas/exclusion-process-component'), require('@senior-gestao-pessoas/hcm-entity-lookups'), require('primeng/button'), require('primeng/checkbox'), require('@angular/platform-browser'), require('primeng/fieldset'), require('primeng/tooltip'), require('primeng/dialog'), require('@senior-gestao-pessoas/angular-components'), require('primeng/radiobutton')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('@senior-gestao-pessoas/hcm-contract-employee-history', ['exports', '@angular/core', '@seniorsistemas/platform-components', '@angular/common/http', 'primeng/api', '@ngx-translate/core', 'rxjs', 'rxjs/operators', '@seniorsistemas/angular-components', 'moment', '@angular/forms', '@angular/router', 'zone.js/dist/zone-error', 'ngx-cookie-service', '@angular/common', 'angular2-hotkeys', 'ng2-currency-mask', 'primeng/calendar', 'primeng/confirmdialog', 'primeng/dropdown', 'primeng/inputmask', 'primeng/inputswitch', 'primeng/inputtext', 'primeng/inputtextarea', 'primeng/messages', 'primeng/panel', 'primeng/splitbutton', 'primeng/table', 'primeng/tabview', 'primeng/toast', 'primeng/togglebutton', '@seniorsistemas/senior-platform-data', 'primeng/selectbutton', '@senior-gestao-pessoas/hcm-advanced-filter-general', '@seniorsistemas/exclusion-process-component', '@senior-gestao-pessoas/hcm-entity-lookups', 'primeng/button', 'primeng/checkbox', '@angular/platform-browser', 'primeng/fieldset', 'primeng/tooltip', 'primeng/dialog', '@senior-gestao-pessoas/angular-components', 'primeng/radiobutton'], factory) :
|
|
4
|
-
(global = global || self, factory((global['senior-gestao-pessoas'] = global['senior-gestao-pessoas'] || {}, global['senior-gestao-pessoas']['hcm-contract-employee-history'] = {}), global.ng.core, global.platformComponents, global.ng.common.http, global.api, global.core$1, global.rxjs, global.rxjs.operators, global.angularComponents, global.moment$
|
|
5
|
-
}(this, (function (exports, core, platformComponents, http, api, core$1, rxjs, operators, angularComponents, moment$
|
|
4
|
+
(global = global || self, factory((global['senior-gestao-pessoas'] = global['senior-gestao-pessoas'] || {}, global['senior-gestao-pessoas']['hcm-contract-employee-history'] = {}), global.ng.core, global.platformComponents, global.ng.common.http, global.api, global.core$1, global.rxjs, global.rxjs.operators, global.angularComponents, global.moment$q, global.ng.forms, global.ng.router, null, global.ngxCookieService, global.ng.common, global.angular2Hotkeys, global.ng2CurrencyMask, global.calendar, global.confirmdialog, global.dropdown, global.inputmask, global.inputswitch, global.inputtext, global.inputtextarea, global.messages, global.panel, global.splitbutton, global.table, global.tabview, global.toast, global.togglebutton, global.seniorPlatformData, global.selectbutton, global.hcmAdvancedFilterGeneral, global.exclusionProcessComponent, global.hcmEntityLookups, global.button, global.checkbox, global.ng.platformBrowser, global.fieldset, global.tooltip, global.dialog, global.angularComponents$1, global.radiobutton));
|
|
5
|
+
}(this, (function (exports, core, platformComponents, http, api, core$1, rxjs, operators, angularComponents, moment$q, forms, router, zoneError, ngxCookieService, common, angular2Hotkeys, ng2CurrencyMask, calendar, confirmdialog, dropdown, inputmask, inputswitch, inputtext, inputtextarea, messages, panel, splitbutton, table, tabview, toast, togglebutton, seniorPlatformData, selectbutton, hcmAdvancedFilterGeneral, exclusionProcessComponent, hcmEntityLookups, button, checkbox, platformBrowser, fieldset, tooltip, dialog, angularComponents$1, radiobutton) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
return value;
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
var moment = moment$
|
|
226
|
+
var moment = moment$q;
|
|
227
227
|
function isObject(item) {
|
|
228
228
|
return item && typeof item === "object" && !Array.isArray(item);
|
|
229
229
|
}
|
|
@@ -444,6 +444,29 @@
|
|
|
444
444
|
return name + " eq '" + value + "'";
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
+
/**
|
|
448
|
+
* Atualiza e força validação somente dos campos especificados.
|
|
449
|
+
* @param abstractControl FormGroup ou FormArray raiz.
|
|
450
|
+
* @param fields Lista de caminhos dos campos a validar. Ex.: ['nome', 'endereco.rua', 'itens.0.quantidade']
|
|
451
|
+
*/
|
|
452
|
+
function validateSpecificControls(abstractControl, fields) {
|
|
453
|
+
fields.forEach(function (path) {
|
|
454
|
+
var control = abstractControl.get(path);
|
|
455
|
+
if (!control) {
|
|
456
|
+
console.warn("Campo n\u00E3o encontrado: " + path);
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
updateSingleControl(control);
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Força validação de um único AbstractControl.
|
|
464
|
+
*/
|
|
465
|
+
function updateSingleControl(control) {
|
|
466
|
+
control.markAsDirty();
|
|
467
|
+
control.markAsTouched();
|
|
468
|
+
control.updateValueAndValidity({ emitEvent: true });
|
|
469
|
+
}
|
|
447
470
|
|
|
448
471
|
|
|
449
472
|
(function (ContractType) {
|
|
@@ -547,14 +570,14 @@
|
|
|
547
570
|
var labelValue = value;
|
|
548
571
|
switch (type) {
|
|
549
572
|
case angularComponents.FieldType.Date:
|
|
550
|
-
labelValue = moment$
|
|
573
|
+
labelValue = moment$q(value).format("L");
|
|
551
574
|
break;
|
|
552
575
|
case angularComponents.FieldType.Time:
|
|
553
|
-
labelValue = moment$
|
|
576
|
+
labelValue = moment$q(value).format("LTS");
|
|
554
577
|
break;
|
|
555
578
|
case angularComponents.FieldType.LocalDateTime:
|
|
556
579
|
case angularComponents.FieldType.DateTime:
|
|
557
|
-
labelValue = moment$
|
|
580
|
+
labelValue = moment$q(value).format("L LTS");
|
|
558
581
|
break;
|
|
559
582
|
case angularComponents.FieldType.Lookup:
|
|
560
583
|
labelValue = searchFields.map(function (field) { return getProp(value, field.name); }).join(" - ");
|
|
@@ -574,7 +597,7 @@
|
|
|
574
597
|
if (!date1 || !date2) {
|
|
575
598
|
return null;
|
|
576
599
|
}
|
|
577
|
-
return moment$
|
|
600
|
+
return moment$q(moment$q(date1).format("YYYY-MM-DD") + moment$q(date2).set({ second: 0, millisecond: 0 }).format("THH:mm:ssZ"));
|
|
578
601
|
};
|
|
579
602
|
var contractTypeOptions = function (translate) {
|
|
580
603
|
return [
|
|
@@ -602,7 +625,7 @@
|
|
|
602
625
|
];
|
|
603
626
|
};
|
|
604
627
|
var getSituationFilterInHistorics = function (situation) {
|
|
605
|
-
var nowDate = moment$
|
|
628
|
+
var nowDate = moment$q().format('YYYY-MM-DD');
|
|
606
629
|
if (situation == SituationEmployee.WORKING) {
|
|
607
630
|
return "(employee.dismissalDate is null or employee.dismissalDate gt '" + nowDate + "')";
|
|
608
631
|
}
|
|
@@ -1214,7 +1237,7 @@
|
|
|
1214
1237
|
/*{CA:FILE_CONTENTS:START}*/
|
|
1215
1238
|
/*{CA:FILE_CONTENTS:END}*/
|
|
1216
1239
|
|
|
1217
|
-
var moment$1 = moment$
|
|
1240
|
+
var moment$1 = moment$q;
|
|
1218
1241
|
var WorkshiftHistoryService = /** @class */ (function (_super) {
|
|
1219
1242
|
__extends(WorkshiftHistoryService, _super);
|
|
1220
1243
|
function WorkshiftHistoryService(http, messageService, translate) {
|
|
@@ -1496,8 +1519,8 @@
|
|
|
1496
1519
|
LeaveHistoryService.prototype.hasV1OrV3LeaveWithinSixtyDays = function (employeeId, referenceDate) {
|
|
1497
1520
|
return this.http.post("hcm_contract/employment_additional_info/queries/hasLeaveWithESocialReasonTypeInPeriod", {
|
|
1498
1521
|
employeeId: employeeId,
|
|
1499
|
-
periodStartDate: moment$
|
|
1500
|
-
periodEndDate: moment$
|
|
1522
|
+
periodStartDate: moment$q(referenceDate).subtract(60, 'days').format('YYYY-MM-DD'),
|
|
1523
|
+
periodEndDate: moment$q(referenceDate).subtract(1, 'millisecond').format('YYYY-MM-DD'),
|
|
1501
1524
|
eSocialReasonTypes: [exports.ESocialReasonType.V1, exports.ESocialReasonType.V3]
|
|
1502
1525
|
}).pipe(this.defaultCatch(), operators.map(function (_a) {
|
|
1503
1526
|
var result = _a.result;
|
|
@@ -1532,8 +1555,8 @@
|
|
|
1532
1555
|
LeaveHistoryBFFService.prototype.hasV1OrV3LeaveWithinSixtyDays = function (employeeId, referenceDate) {
|
|
1533
1556
|
return this.http.post(this.QUERIES_URL + "/hasLeaveWithESocialReasonTypeInPeriodBFF", {
|
|
1534
1557
|
employeeId: employeeId,
|
|
1535
|
-
periodStartDate: moment$
|
|
1536
|
-
periodEndDate: moment$
|
|
1558
|
+
periodStartDate: moment$q(referenceDate).subtract(60, 'days').format('YYYY-MM-DD'),
|
|
1559
|
+
periodEndDate: moment$q(referenceDate).subtract(1, 'millisecond').format('YYYY-MM-DD'),
|
|
1537
1560
|
eSocialReasonTypes: [exports.ESocialReasonType.V1, exports.ESocialReasonType.V3]
|
|
1538
1561
|
}).pipe(this.defaultCatch(), operators.map(function (_a) {
|
|
1539
1562
|
var result = _a.result;
|
|
@@ -1793,7 +1816,7 @@
|
|
|
1793
1816
|
ESocialReasonService.prototype.fetchESocialReasonType = function (situationId, referenceDate) {
|
|
1794
1817
|
return this.listExternalESocialReason({
|
|
1795
1818
|
displayFields: ['id', 'eSocialReasonType'],
|
|
1796
|
-
filterQuery: "situation.id eq '" + situationId + "' and competence le '" + moment$
|
|
1819
|
+
filterQuery: "situation.id eq '" + situationId + "' and competence le '" + moment$q(referenceDate).format("YYYY-MM-DD") + "'",
|
|
1797
1820
|
page: 0,
|
|
1798
1821
|
size: 1,
|
|
1799
1822
|
sort: [{ field: 'competence', order: -1 }]
|
|
@@ -2551,7 +2574,7 @@
|
|
|
2551
2574
|
return CoreHistoryModule;
|
|
2552
2575
|
}());
|
|
2553
2576
|
|
|
2554
|
-
var moment$2 = moment$
|
|
2577
|
+
var moment$2 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2555
2578
|
var E001Pes = /** @class */ (function () {
|
|
2556
2579
|
function E001Pes() {
|
|
2557
2580
|
this.excluido = false;
|
|
@@ -2576,7 +2599,7 @@
|
|
|
2576
2599
|
return E001Pes;
|
|
2577
2600
|
}());
|
|
2578
2601
|
|
|
2579
|
-
var moment$3 = moment$
|
|
2602
|
+
var moment$3 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2580
2603
|
var Employee = /** @class */ (function () {
|
|
2581
2604
|
function Employee() {
|
|
2582
2605
|
this.deleted = false;
|
|
@@ -2628,7 +2651,7 @@
|
|
|
2628
2651
|
}());
|
|
2629
2652
|
|
|
2630
2653
|
/*{CA:PACKAGE_IMPORTS:START}*/
|
|
2631
|
-
var moment$4 = moment$
|
|
2654
|
+
var moment$4 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2632
2655
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
2633
2656
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
2634
2657
|
var Workshift = /** @class */ (function () {
|
|
@@ -2674,7 +2697,7 @@
|
|
|
2674
2697
|
/*{CA:FILE_CONTENTS:END}*/
|
|
2675
2698
|
|
|
2676
2699
|
/*{CA:PACKAGE_IMPORTS:START}*/
|
|
2677
|
-
var moment$5 = moment$
|
|
2700
|
+
var moment$5 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2678
2701
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
2679
2702
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
2680
2703
|
var WorkshiftGroup = /** @class */ (function () {
|
|
@@ -2721,7 +2744,7 @@
|
|
|
2721
2744
|
/*{CA:FILE_CONTENTS:END}*/
|
|
2722
2745
|
|
|
2723
2746
|
/*{CA:PACKAGE_IMPORTS:START}*/
|
|
2724
|
-
var moment$6 = moment$
|
|
2747
|
+
var moment$6 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2725
2748
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
2726
2749
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
2727
2750
|
var WorkshiftHistory = /** @class */ (function () {
|
|
@@ -2803,7 +2826,7 @@
|
|
|
2803
2826
|
/*{CA:FILE_CONTENTS:END}*/
|
|
2804
2827
|
|
|
2805
2828
|
/*{CA:PACKAGE_IMPORTS:START}*/
|
|
2806
|
-
var moment$7 = moment$
|
|
2829
|
+
var moment$7 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2807
2830
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
2808
2831
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
2809
2832
|
var AnnotationType = /** @class */ (function () {
|
|
@@ -2835,7 +2858,7 @@
|
|
|
2835
2858
|
/*{CA:FILE_CONTENTS:START}*/
|
|
2836
2859
|
/*{CA:FILE_CONTENTS:END}*/
|
|
2837
2860
|
|
|
2838
|
-
var moment$8 = moment$
|
|
2861
|
+
var moment$8 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2839
2862
|
/*{CA:PACKAGE_IMPORTS:END}*/
|
|
2840
2863
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
2841
2864
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
@@ -2931,7 +2954,7 @@
|
|
|
2931
2954
|
/*{CA:FILE_CONTENTS:START}*/
|
|
2932
2955
|
/*{CA:FILE_CONTENTS:END}*/
|
|
2933
2956
|
|
|
2934
|
-
var moment$9 = moment$
|
|
2957
|
+
var moment$9 = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2935
2958
|
/*{CA:PACKAGE_IMPORTS:END}*/
|
|
2936
2959
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
2937
2960
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
@@ -2976,7 +2999,7 @@
|
|
|
2976
2999
|
/*{CA:FILE_CONTENTS:START}*/
|
|
2977
3000
|
/*{CA:FILE_CONTENTS:END}*/
|
|
2978
3001
|
|
|
2979
|
-
var moment$a = moment$
|
|
3002
|
+
var moment$a = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
2980
3003
|
/*{CA:PACKAGE_IMPORTS:END}*/
|
|
2981
3004
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
2982
3005
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
@@ -3024,7 +3047,7 @@
|
|
|
3024
3047
|
/*{CA:FILE_CONTENTS:START}*/
|
|
3025
3048
|
/*{CA:FILE_CONTENTS:END}*/
|
|
3026
3049
|
|
|
3027
|
-
var moment$b = moment$
|
|
3050
|
+
var moment$b = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
3028
3051
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
3029
3052
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
3030
3053
|
var BankAccountHistory = /** @class */ (function () {
|
|
@@ -3315,8 +3338,8 @@
|
|
|
3315
3338
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
3316
3339
|
DiseaseSubgroup.fromDto = function (diseaseSubgroupDto, originEntity) {
|
|
3317
3340
|
var model = __assign({}, diseaseSubgroupDto);
|
|
3318
|
-
model.createdDate = model.createdDate && moment$
|
|
3319
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
3341
|
+
model.createdDate = model.createdDate && moment$q(model.createdDate).toDate();
|
|
3342
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$q(model.lastModifiedDate).toDate();
|
|
3320
3343
|
var lookupSeparator = " - ";
|
|
3321
3344
|
var displayFields = [
|
|
3322
3345
|
"id",
|
|
@@ -3335,8 +3358,8 @@
|
|
|
3335
3358
|
};
|
|
3336
3359
|
DiseaseSubgroup.toDto = function (diseaseSubgroup, originEntity) {
|
|
3337
3360
|
var dto = __assign({}, diseaseSubgroup);
|
|
3338
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3339
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
3361
|
+
dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
|
|
3362
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
|
|
3340
3363
|
delete dto.label;
|
|
3341
3364
|
return dto;
|
|
3342
3365
|
};
|
|
@@ -3354,8 +3377,8 @@
|
|
|
3354
3377
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
3355
3378
|
Disease.fromDto = function (diseaseDto, originEntity) {
|
|
3356
3379
|
var model = __assign({}, diseaseDto);
|
|
3357
|
-
model.createdDate = model.createdDate && moment$
|
|
3358
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
3380
|
+
model.createdDate = model.createdDate && moment$q(model.createdDate).toDate();
|
|
3381
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$q(model.lastModifiedDate).toDate();
|
|
3359
3382
|
var lookupSeparator = " - ";
|
|
3360
3383
|
var displayFields = [
|
|
3361
3384
|
"id",
|
|
@@ -3376,8 +3399,8 @@
|
|
|
3376
3399
|
};
|
|
3377
3400
|
Disease.toDto = function (disease, originEntity) {
|
|
3378
3401
|
var dto = __assign({}, disease);
|
|
3379
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3380
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
3402
|
+
dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
|
|
3403
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
|
|
3381
3404
|
delete dto.label;
|
|
3382
3405
|
if (originEntity !== "DiseaseSubgroup" && dto.diseaseSubgroup)
|
|
3383
3406
|
dto.diseaseSubgroup = DiseaseSubgroup.toDto(dto.diseaseSubgroup, "Disease");
|
|
@@ -3397,8 +3420,8 @@
|
|
|
3397
3420
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
3398
3421
|
Situation.fromDto = function (situationDto, originEntity) {
|
|
3399
3422
|
var model = __assign({}, situationDto);
|
|
3400
|
-
model.createdDate = model.createdDate && moment$
|
|
3401
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
3423
|
+
model.createdDate = model.createdDate && moment$q(model.createdDate).toDate();
|
|
3424
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$q(model.lastModifiedDate).toDate();
|
|
3402
3425
|
var lookupSeparator = " - ";
|
|
3403
3426
|
var displayFields = [
|
|
3404
3427
|
"id",
|
|
@@ -3418,8 +3441,8 @@
|
|
|
3418
3441
|
};
|
|
3419
3442
|
Situation.toDto = function (situation, originEntity) {
|
|
3420
3443
|
var dto = __assign({}, situation);
|
|
3421
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3422
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
3444
|
+
dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
|
|
3445
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
|
|
3423
3446
|
delete dto.label;
|
|
3424
3447
|
return dto;
|
|
3425
3448
|
};
|
|
@@ -3438,12 +3461,12 @@
|
|
|
3438
3461
|
LeaveHistory.fromDto = function (leaveHistoryDto, originEntity) {
|
|
3439
3462
|
var _a;
|
|
3440
3463
|
var model = __assign({}, leaveHistoryDto);
|
|
3441
|
-
model.startDate = model.startDate && moment$
|
|
3442
|
-
model.endDate = model.endDate && moment$
|
|
3443
|
-
model.birthDate = model.birthDate && moment$
|
|
3444
|
-
model.estimatedEndDate = model.estimatedEndDate && moment$
|
|
3445
|
-
model.createdDate = model.createdDate && moment$
|
|
3446
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
3464
|
+
model.startDate = model.startDate && moment$q(model.startDate).toDate();
|
|
3465
|
+
model.endDate = model.endDate && moment$q(model.endDate).toDate();
|
|
3466
|
+
model.birthDate = model.birthDate && moment$q(model.birthDate).toDate();
|
|
3467
|
+
model.estimatedEndDate = model.estimatedEndDate && moment$q(model.estimatedEndDate).toDate();
|
|
3468
|
+
model.createdDate = model.createdDate && moment$q(model.createdDate).toDate();
|
|
3469
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$q(model.lastModifiedDate).toDate();
|
|
3447
3470
|
var lookupSeparator = " - ";
|
|
3448
3471
|
var displayFields = [
|
|
3449
3472
|
"id",
|
|
@@ -3491,8 +3514,8 @@
|
|
|
3491
3514
|
LeaveHistory.toDto = function (leaveHistory, originEntity) {
|
|
3492
3515
|
var _a;
|
|
3493
3516
|
var dto = __assign({}, leaveHistory);
|
|
3494
|
-
dto.startDate = dto.startDate && moment$
|
|
3495
|
-
dto.endDate = dto.endDate && moment$
|
|
3517
|
+
dto.startDate = dto.startDate && moment$q(dto.startDate).format("YYYY-MM-DD");
|
|
3518
|
+
dto.endDate = dto.endDate && moment$q(dto.endDate).format("YYYY-MM-DD");
|
|
3496
3519
|
if ((dto === null || dto === void 0 ? void 0 : dto.cnpjUnion) && typeof (dto === null || dto === void 0 ? void 0 : dto.cnpjUnion) === "string") {
|
|
3497
3520
|
dto.cnpjUnion = +dto.cnpjUnion.replaceAll(".", "").replaceAll("/", "").replaceAll("-", "");
|
|
3498
3521
|
}
|
|
@@ -3505,10 +3528,10 @@
|
|
|
3505
3528
|
if (!((_a = dto === null || dto === void 0 ? void 0 : dto.cnpjForElectiveMandatory) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
3506
3529
|
dto.cnpjForElectiveMandatory = null;
|
|
3507
3530
|
}
|
|
3508
|
-
dto.birthDate = dto.birthDate && moment$
|
|
3509
|
-
dto.estimatedEndDate = dto.estimatedEndDate && moment$
|
|
3510
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3511
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
3531
|
+
dto.birthDate = dto.birthDate && moment$q(dto.birthDate).format("YYYY-MM-DD");
|
|
3532
|
+
dto.estimatedEndDate = dto.estimatedEndDate && moment$q(dto.estimatedEndDate).format("YYYY-MM-DD");
|
|
3533
|
+
dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
|
|
3534
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
|
|
3512
3535
|
delete dto.label;
|
|
3513
3536
|
if (originEntity !== "Employee" && dto.employee)
|
|
3514
3537
|
dto.employee = Employee.toDto(dto.employee, "LeaveHistory");
|
|
@@ -3538,7 +3561,7 @@
|
|
|
3538
3561
|
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; });
|
|
3539
3562
|
var advancedFilterId = (_c = filter === null || filter === void 0 ? void 0 : filter.advancedFilter) === null || _c === void 0 ? void 0 : _c.id;
|
|
3540
3563
|
var leaveHistoryDto = __assign({}, entity);
|
|
3541
|
-
var leaveHistoryBatchDTO = __assign(__assign({}, entity), { startDate: entity.startDate && moment$
|
|
3564
|
+
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") });
|
|
3542
3565
|
if (leaveHistoryBatchDTO.cnpjUnion && typeof leaveHistoryBatchDTO.cnpjUnion === "string") {
|
|
3543
3566
|
leaveHistoryBatchDTO.cnpjUnion = +leaveHistoryDto.cnpjUnion.replaceAll(".", "").replaceAll("/", "").replaceAll("-", "");
|
|
3544
3567
|
}
|
|
@@ -3570,9 +3593,9 @@
|
|
|
3570
3593
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
3571
3594
|
ESocialReason.fromDto = function (eSocialReasonDto, originEntity) {
|
|
3572
3595
|
var model = __assign({}, eSocialReasonDto);
|
|
3573
|
-
model.competence = model.competence && moment$
|
|
3574
|
-
model.createdDate = model.createdDate && moment$
|
|
3575
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
3596
|
+
model.competence = model.competence && moment$q(model.competence).toDate();
|
|
3597
|
+
model.createdDate = model.createdDate && moment$q(model.createdDate).toDate();
|
|
3598
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$q(model.lastModifiedDate).toDate();
|
|
3576
3599
|
var lookupSeparator = " - ";
|
|
3577
3600
|
var displayFields = [
|
|
3578
3601
|
"id",
|
|
@@ -3591,9 +3614,9 @@
|
|
|
3591
3614
|
};
|
|
3592
3615
|
ESocialReason.toDto = function (eSocialReason, originEntity) {
|
|
3593
3616
|
var dto = __assign({}, eSocialReason);
|
|
3594
|
-
dto.competence = dto.competence && moment$
|
|
3595
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3596
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
3617
|
+
dto.competence = dto.competence && moment$q(dto.competence).format("YYYY-MM-DD");
|
|
3618
|
+
dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
|
|
3619
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
|
|
3597
3620
|
delete dto.label;
|
|
3598
3621
|
if (originEntity !== "Situation" && dto.situation)
|
|
3599
3622
|
dto.situation = Situation.toDto(dto.situation, "ESocialReason");
|
|
@@ -3615,10 +3638,10 @@
|
|
|
3615
3638
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
3616
3639
|
RegulatoryNormTrainingHistory.fromDto = function (regulatoryNormTrainingHistoryDto, originEntity) {
|
|
3617
3640
|
var model = __assign({}, regulatoryNormTrainingHistoryDto);
|
|
3618
|
-
model.startDate = model.startDate && moment$
|
|
3619
|
-
model.endDate = model.endDate && moment$
|
|
3620
|
-
model.createdDate = model.createdDate && moment$
|
|
3621
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
3641
|
+
model.startDate = model.startDate && moment$q(model.startDate).toDate();
|
|
3642
|
+
model.endDate = model.endDate && moment$q(model.endDate).toDate();
|
|
3643
|
+
model.createdDate = model.createdDate && moment$q(model.createdDate).toDate();
|
|
3644
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$q(model.lastModifiedDate).toDate();
|
|
3622
3645
|
var lookupSeparator = " - ";
|
|
3623
3646
|
var displayFields = [
|
|
3624
3647
|
"id",
|
|
@@ -3637,10 +3660,10 @@
|
|
|
3637
3660
|
};
|
|
3638
3661
|
RegulatoryNormTrainingHistory.toDto = function (regulatoryNormTrainingHistory, originEntity) {
|
|
3639
3662
|
var dto = __assign({}, regulatoryNormTrainingHistory);
|
|
3640
|
-
dto.startDate = dto.startDate && moment$
|
|
3641
|
-
dto.endDate = dto.endDate && moment$
|
|
3642
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3643
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
3663
|
+
dto.startDate = dto.startDate && moment$q(dto.startDate).format("YYYY-MM-DD");
|
|
3664
|
+
dto.endDate = dto.endDate && moment$q(dto.endDate).format("YYYY-MM-DD");
|
|
3665
|
+
dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
|
|
3666
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
|
|
3644
3667
|
delete dto.label;
|
|
3645
3668
|
if (originEntity !== "Employee" && dto.employee)
|
|
3646
3669
|
dto.employee = Employee.toDto(dto.employee, "RegulatoryNormTrainingHistory");
|
|
@@ -3747,8 +3770,8 @@
|
|
|
3747
3770
|
var validator = function (control) {
|
|
3748
3771
|
var referenceDate = control && control.value;
|
|
3749
3772
|
if (referenceDate && dateFormat) {
|
|
3750
|
-
referenceDate = moment$
|
|
3751
|
-
var compareTo = moment$
|
|
3773
|
+
referenceDate = moment$q(control.value);
|
|
3774
|
+
var compareTo = moment$q(compareToDate, dateFormat);
|
|
3752
3775
|
return _this.dateCompare(referenceDate, compareTo, compareType, options);
|
|
3753
3776
|
}
|
|
3754
3777
|
return null;
|
|
@@ -3890,7 +3913,7 @@
|
|
|
3890
3913
|
}
|
|
3891
3914
|
function startDateIsBeforeEndDateValidator(startDate, endDate) {
|
|
3892
3915
|
if (startDate && endDate && startDate.value && endDate.value) {
|
|
3893
|
-
var forbidden = moment$
|
|
3916
|
+
var forbidden = moment$q(startDate.value).isSameOrAfter(endDate.value) ? { startDateIsBeforeEndDate: { value: endDate.value } } : null;
|
|
3894
3917
|
if (forbidden) {
|
|
3895
3918
|
startDate.markAsDirty();
|
|
3896
3919
|
endDate.markAsDirty();
|
|
@@ -3910,7 +3933,7 @@
|
|
|
3910
3933
|
return null;
|
|
3911
3934
|
}
|
|
3912
3935
|
|
|
3913
|
-
var moment$c = moment$
|
|
3936
|
+
var moment$c = moment$q;
|
|
3914
3937
|
var BaseHistoryComponent = /** @class */ (function () {
|
|
3915
3938
|
function BaseHistoryComponent(translate, baseService, platformService, messageService) {
|
|
3916
3939
|
this.translate = translate;
|
|
@@ -4242,7 +4265,7 @@
|
|
|
4242
4265
|
return FocusService;
|
|
4243
4266
|
}());
|
|
4244
4267
|
|
|
4245
|
-
var moment$d = moment$
|
|
4268
|
+
var moment$d = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
4246
4269
|
var ClockingEventTimeEvaluationGeneralService = /** @class */ (function () {
|
|
4247
4270
|
function ClockingEventTimeEvaluationGeneralService(http) {
|
|
4248
4271
|
this.http = http;
|
|
@@ -4719,7 +4742,7 @@
|
|
|
4719
4742
|
return BaseHistoryModule;
|
|
4720
4743
|
}());
|
|
4721
4744
|
|
|
4722
|
-
var moment$e = moment$
|
|
4745
|
+
var moment$e = moment$q;
|
|
4723
4746
|
var BaseCollectiveHistoryComponent = /** @class */ (function (_super) {
|
|
4724
4747
|
__extends(BaseCollectiveHistoryComponent, _super);
|
|
4725
4748
|
function BaseCollectiveHistoryComponent(translate, baseService, platformService, messageService, collectiveService) {
|
|
@@ -4937,7 +4960,7 @@
|
|
|
4937
4960
|
ProfileType["MANAGEMENT"] = "MANAGEMENT";
|
|
4938
4961
|
})(ProfileType || (ProfileType = {}));
|
|
4939
4962
|
|
|
4940
|
-
var moment$f = moment$
|
|
4963
|
+
var moment$f = moment$q;
|
|
4941
4964
|
var ClockingEventComponent = /** @class */ (function (_super) {
|
|
4942
4965
|
__extends(ClockingEventComponent, _super);
|
|
4943
4966
|
function ClockingEventComponent(translate, baseService, employeeService, platformService, messageService, leaveHistoryBffService) {
|
|
@@ -5163,7 +5186,7 @@
|
|
|
5163
5186
|
return ClockingEventComponent;
|
|
5164
5187
|
}(BaseCollectiveHistoryComponent));
|
|
5165
5188
|
|
|
5166
|
-
var moment$g = moment$
|
|
5189
|
+
var moment$g = moment$q;
|
|
5167
5190
|
var WorkshiftHistoryFormComponent = /** @class */ (function (_super) {
|
|
5168
5191
|
__extends(WorkshiftHistoryFormComponent, _super);
|
|
5169
5192
|
function WorkshiftHistoryFormComponent(workshiftHistoryService, router, route, messageService, confirmationService, formBuilder, translate, hotkeysService, fieldCustomization, focusService, workshiftGroupService, employeeService, cd, baseService, clockingEventFoundationGeneralService, platformService, workshiftLookupService, collectiveService, workshiftHistoryAdjustmentService, employeeLibService, workshiftInformationHistoryService) {
|
|
@@ -5941,7 +5964,7 @@
|
|
|
5941
5964
|
/*{CA:FILE_CONTENTS:START}*/
|
|
5942
5965
|
/*{CA:FILE_CONTENTS:END}*/
|
|
5943
5966
|
|
|
5944
|
-
var moment$h = moment$
|
|
5967
|
+
var moment$h = moment$q;
|
|
5945
5968
|
var WorkshiftHistoryListComponent = /** @class */ (function (_super) {
|
|
5946
5969
|
__extends(WorkshiftHistoryListComponent, _super);
|
|
5947
5970
|
function WorkshiftHistoryListComponent(
|
|
@@ -7079,7 +7102,7 @@
|
|
|
7079
7102
|
return ClockingEventModule;
|
|
7080
7103
|
}());
|
|
7081
7104
|
|
|
7082
|
-
var moment$i = moment$
|
|
7105
|
+
var moment$i = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
7083
7106
|
function mapLookupFilterQuery(value, type, name) {
|
|
7084
7107
|
if (typeof value == "number")
|
|
7085
7108
|
return name + " eq " + value;
|
|
@@ -7283,13 +7306,13 @@
|
|
|
7283
7306
|
return name + " eq " + value;
|
|
7284
7307
|
}
|
|
7285
7308
|
else if (type === angularComponents.FieldType.Date) {
|
|
7286
|
-
return name + " eq '" + moment$
|
|
7309
|
+
return name + " eq '" + moment$q(value).format("YYYY-MM-DD") + "'";
|
|
7287
7310
|
}
|
|
7288
7311
|
else if (type === angularComponents.FieldType.Time) {
|
|
7289
|
-
return name + " eq '" + moment$
|
|
7312
|
+
return name + " eq '" + moment$q(value).format("HH:mm:ss") + "'";
|
|
7290
7313
|
}
|
|
7291
7314
|
else if (type === angularComponents.FieldType.DateTime) {
|
|
7292
|
-
return name + " eq '" + moment$
|
|
7315
|
+
return name + " eq '" + moment$q(value).format() + "'";
|
|
7293
7316
|
}
|
|
7294
7317
|
else if (type === angularComponents.FieldType.Enum) {
|
|
7295
7318
|
return name + " eq '" + value + "'";
|
|
@@ -7329,13 +7352,13 @@
|
|
|
7329
7352
|
return name + " eq " + value;
|
|
7330
7353
|
}
|
|
7331
7354
|
else if (type === angularComponents.FieldType.Date) {
|
|
7332
|
-
return name + " eq '" + moment$
|
|
7355
|
+
return name + " eq '" + moment$q(value).format("YYYY-MM-DD") + "'";
|
|
7333
7356
|
}
|
|
7334
7357
|
else if (type === angularComponents.FieldType.Time) {
|
|
7335
|
-
return name + " eq '" + moment$
|
|
7358
|
+
return name + " eq '" + moment$q(value).format("HH:mm:ss") + "'";
|
|
7336
7359
|
}
|
|
7337
7360
|
else if (type === angularComponents.FieldType.DateTime) {
|
|
7338
|
-
return name + " eq '" + moment$
|
|
7361
|
+
return name + " eq '" + moment$q(value).format() + "'";
|
|
7339
7362
|
}
|
|
7340
7363
|
else if (type === angularComponents.FieldType.Enum) {
|
|
7341
7364
|
return _this.loadEnumFromLabel(value)
|
|
@@ -7952,7 +7975,7 @@
|
|
|
7952
7975
|
return WorkshiftHistoryFeatureModule;
|
|
7953
7976
|
}());
|
|
7954
7977
|
|
|
7955
|
-
var moment$j = moment$
|
|
7978
|
+
var moment$j = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
7956
7979
|
var AnnotationHistoryFormComponent = /** @class */ (function (_super) {
|
|
7957
7980
|
__extends(AnnotationHistoryFormComponent, _super);
|
|
7958
7981
|
function AnnotationHistoryFormComponent(annotationHistoryService, router, route, messageService, confirmationService, formBuilder, translate, hotkeysService, fieldCustomization, focusService, annotationTypeLookupService, employeeService, baseService, platformService, cd, collectiveService, sanitizer, annotationHistoryAttachmentService, employeeLookupService) {
|
|
@@ -8702,7 +8725,7 @@
|
|
|
8702
8725
|
/*{CA:FILE_CONTENTS:END}*/
|
|
8703
8726
|
|
|
8704
8727
|
/*{CA:EXTERNAL_IMPORTS:START}*/
|
|
8705
|
-
var moment$k = moment$
|
|
8728
|
+
var moment$k = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
8706
8729
|
/*{CA:EXTERNAL_IMPORTS:END}*/
|
|
8707
8730
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
8708
8731
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
@@ -11721,7 +11744,7 @@
|
|
|
11721
11744
|
if (employeeId && referenceDate) {
|
|
11722
11745
|
var estimatedJourneyCompleted = this.formGroup.get("estimatedJourneyCompleted").value;
|
|
11723
11746
|
var actualReferenceDate = (estimatedJourneyCompleted ?
|
|
11724
|
-
moment$
|
|
11747
|
+
moment$q(referenceDate).format("YYYY-MM-DDTHH:mm:ss-00:00") : referenceDate);
|
|
11725
11748
|
return this.getObservable(employeeId, actualReferenceDate);
|
|
11726
11749
|
}
|
|
11727
11750
|
else {
|
|
@@ -12405,7 +12428,7 @@
|
|
|
12405
12428
|
var startDate = this.formGroup.get("startDate").value;
|
|
12406
12429
|
var estimatedEndDate = this.formGroup.get("estimatedEndDate").value;
|
|
12407
12430
|
if (startDate && estimatedEndDate) {
|
|
12408
|
-
var estimatedDayEnd = moment$
|
|
12431
|
+
var estimatedDayEnd = moment$q(estimatedEndDate).diff(moment$q(startDate), "days") + 1;
|
|
12409
12432
|
control.setValue(estimatedDayEnd);
|
|
12410
12433
|
}
|
|
12411
12434
|
}
|
|
@@ -12426,7 +12449,7 @@
|
|
|
12426
12449
|
var startDate = this.formGroup.get("startDate").value;
|
|
12427
12450
|
var estimatedDayEnd = this.formGroup.get("estimatedDayEnd").value;
|
|
12428
12451
|
if (startDate && estimatedDayEnd) {
|
|
12429
|
-
var estimatedEndDate = moment$
|
|
12452
|
+
var estimatedEndDate = moment$q(startDate).add(estimatedDayEnd, "days").add(-1, "day").toDate();
|
|
12430
12453
|
control.setValue(estimatedEndDate);
|
|
12431
12454
|
}
|
|
12432
12455
|
}
|
|
@@ -12461,7 +12484,7 @@
|
|
|
12461
12484
|
return this.formGroupDependent(function () {
|
|
12462
12485
|
var startDate = _this.formGroup.get("startDate").value;
|
|
12463
12486
|
var estimatedEndDate = _this.formGroup.get("estimatedEndDate").value;
|
|
12464
|
-
if (startDate && estimatedEndDate && moment$
|
|
12487
|
+
if (startDate && estimatedEndDate && moment$q(startDate).isAfter(moment$q(estimatedEndDate))) {
|
|
12465
12488
|
return { estimatedEndDateMustBeGreaterThanOrEqualToStartDate: true };
|
|
12466
12489
|
}
|
|
12467
12490
|
return null;
|
|
@@ -12481,8 +12504,8 @@
|
|
|
12481
12504
|
var startDateValue = _this.formGroup.get("startDate").value;
|
|
12482
12505
|
var endDateValue = _this.formGroup.get("endDate").value;
|
|
12483
12506
|
var estimatedJourneyCompletedValue = _this.formGroup.get("estimatedJourneyCompleted").value;
|
|
12484
|
-
var startTimeValue = estimatedJourneyCompletedValue ? moment$
|
|
12485
|
-
var endTimeValue = estimatedJourneyCompletedValue ? moment$
|
|
12507
|
+
var startTimeValue = estimatedJourneyCompletedValue ? moment$q().hours(0).minutes(0) : _this.formGroup.get("startTime").value;
|
|
12508
|
+
var endTimeValue = estimatedJourneyCompletedValue ? moment$q().hours(23).minutes(59) : _this.formGroup.get("endTime").value;
|
|
12486
12509
|
var startDateTimeConcat = _this.getFullDateTime(startDateValue, startTimeValue);
|
|
12487
12510
|
var endDateTimeConcat = _this.getFullDateTime(endDateValue, endTimeValue);
|
|
12488
12511
|
if (startDateValue && startTimeValue && endDateValue && endTimeValue && startDateTimeConcat.isAfter(endDateTimeConcat)) {
|
|
@@ -12516,8 +12539,8 @@
|
|
|
12516
12539
|
var value = control.value;
|
|
12517
12540
|
var startDate = _this.formGroup.get("startDate").value;
|
|
12518
12541
|
var endDate = _this.formGroup.get("endDate").value;
|
|
12519
|
-
var startDatePlusJustifiedDays = (startDate && value) && (moment$
|
|
12520
|
-
if (endDate && startDatePlusJustifiedDays && moment$
|
|
12542
|
+
var startDatePlusJustifiedDays = (startDate && value) && (moment$q(startDate).add(value, "days").subtract(1, "days"));
|
|
12543
|
+
if (endDate && startDatePlusJustifiedDays && moment$q(startDatePlusJustifiedDays).isAfter(endDate)) {
|
|
12521
12544
|
return { justifiedDaysQuantityMustBeLowerThanEndDate: true };
|
|
12522
12545
|
}
|
|
12523
12546
|
return null;
|
|
@@ -12526,7 +12549,7 @@
|
|
|
12526
12549
|
LeaveHistoryFormComponent.prototype.getTimeIsNotZeroValidator = function () {
|
|
12527
12550
|
return this.formGroupDependent(function (control) {
|
|
12528
12551
|
var value = control.value;
|
|
12529
|
-
var convertedValue = value && moment$
|
|
12552
|
+
var convertedValue = value && moment$q(value).isValid() && moment$q(value).format("HH:mm");
|
|
12530
12553
|
var isDateTimeZero = convertedValue === "00:00";
|
|
12531
12554
|
if (isDateTimeZero) {
|
|
12532
12555
|
return { timeMustNotBeZero: true };
|
|
@@ -12549,7 +12572,7 @@
|
|
|
12549
12572
|
if (time) {
|
|
12550
12573
|
return mergeDateTime(date, time);
|
|
12551
12574
|
}
|
|
12552
|
-
return moment$
|
|
12575
|
+
return moment$q(date);
|
|
12553
12576
|
}
|
|
12554
12577
|
return null;
|
|
12555
12578
|
};
|
|
@@ -12561,10 +12584,10 @@
|
|
|
12561
12584
|
var estimatedJourneyCompletedControl = this.formGroup.get("estimatedJourneyCompleted");
|
|
12562
12585
|
if (this.isHourAndMinuteZero(startTimeControl.value)) {
|
|
12563
12586
|
estimatedJourneyCompletedControl.setValue(true);
|
|
12564
|
-
startDateControl.setValue(moment$
|
|
12587
|
+
startDateControl.setValue(moment$q(startDateControl.value).toDate());
|
|
12565
12588
|
startTimeControl.setValue(null);
|
|
12566
12589
|
if (endDateControl.value) {
|
|
12567
|
-
endDateControl.setValue(moment$
|
|
12590
|
+
endDateControl.setValue(moment$q(endDateControl.value).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).toDate());
|
|
12568
12591
|
}
|
|
12569
12592
|
endTimeControl.setValue(null);
|
|
12570
12593
|
this.setEnabledStatus(endTimeControl, false);
|
|
@@ -12577,7 +12600,7 @@
|
|
|
12577
12600
|
this.setEnabledStatus(estimatedJourneyCompletedControl, false);
|
|
12578
12601
|
};
|
|
12579
12602
|
LeaveHistoryFormComponent.prototype.isHourAndMinuteZero = function (value) {
|
|
12580
|
-
return moment$
|
|
12603
|
+
return moment$q(value).hours() === 0 && moment$q(value).minutes() === 0;
|
|
12581
12604
|
};
|
|
12582
12605
|
LeaveHistoryFormComponent.prototype.loadLabelFromEnumOptions = function (value, enumOptions) {
|
|
12583
12606
|
var foundEnum = enumOptions.filter(function (r) { return r.value === value; }) || this.situationTypeOptions.filter(function (r) { return r.value === value; });
|
|
@@ -12610,7 +12633,7 @@
|
|
|
12610
12633
|
}
|
|
12611
12634
|
else {
|
|
12612
12635
|
var leaveHistory = new LeaveHistory();
|
|
12613
|
-
leaveHistory.startDate = startDate ? moment$
|
|
12636
|
+
leaveHistory.startDate = startDate ? moment$q(startDate).toDate() : leaveHistory.startDate;
|
|
12614
12637
|
leaveHistory.employee = Employee.fromDto(dtoContent);
|
|
12615
12638
|
this.startFuncionsByBaseHistory();
|
|
12616
12639
|
this.applyAllFieldBehaviour();
|
|
@@ -12841,7 +12864,7 @@
|
|
|
12841
12864
|
/*{CA:FILE_CONTENTS:START}*/
|
|
12842
12865
|
/*{CA:FILE_CONTENTS:END}*/
|
|
12843
12866
|
|
|
12844
|
-
var moment$l = moment$
|
|
12867
|
+
var moment$l = moment$q;
|
|
12845
12868
|
var LeaveHistoryListComponent = /** @class */ (function (_super) {
|
|
12846
12869
|
__extends(LeaveHistoryListComponent, _super);
|
|
12847
12870
|
function LeaveHistoryListComponent(router, route, leaveHistoryService, confirmationService, situationService, translate, baseService, messageService, hotkeysService, formBuilder, filtersStorageService, paginatorStorageService, companyService, companyBranchService, employeeLookupService, platformService, configService) {
|
|
@@ -13820,7 +13843,7 @@
|
|
|
13820
13843
|
return LeaveHistoryFeatureModule;
|
|
13821
13844
|
}());
|
|
13822
13845
|
|
|
13823
|
-
var moment$m = moment$
|
|
13846
|
+
var moment$m = moment$q;
|
|
13824
13847
|
var BankAccountItemComponent = /** @class */ (function () {
|
|
13825
13848
|
function BankAccountItemComponent(
|
|
13826
13849
|
/*{CA:INJECTIONS:START}*/
|
|
@@ -14462,60 +14485,6 @@
|
|
|
14462
14485
|
return BankAccountItemModule;
|
|
14463
14486
|
}());
|
|
14464
14487
|
|
|
14465
|
-
var fallback = {
|
|
14466
|
-
"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.",
|
|
14467
|
-
"hcm_contract.employment_additional_info.annotation_history": "Histórico de Anotação",
|
|
14468
|
-
"hcm_contract.employment_additional_info.annotation_history_annotation": "Anotação",
|
|
14469
|
-
"hcm_contract.employment_additional_info.annotation_history_contract": "Colaborador",
|
|
14470
|
-
"hcm_contract.employment_additional_info.annotation_history_contract_code": "Colaborador",
|
|
14471
|
-
"hcm_contract.employment_additional_info.annotation_history_contract_person_nom_pes": "Nome do colaborador",
|
|
14472
|
-
"hcm_contract.employment_additional_info.annotation_history_contract_search_title": "Colaborador",
|
|
14473
|
-
"hcm_contract.employment_additional_info.annotation_history_date": "Data",
|
|
14474
|
-
"hcm_contract.employment_contract.admission_generic_field_validator_editable": "Campo desabilitado para edição.",
|
|
14475
|
-
"hcm_contract.employment_additional_info.annotation_history_document_number": "Número do documento",
|
|
14476
|
-
"hcm_contract.employment_additional_info.annotation_history_employee": "Colaborador",
|
|
14477
|
-
"hcm_contract.employment_additional_info.annotation_history_empty_state_description": "Não há registros cadastrados até o momento.",
|
|
14478
|
-
"hcm_contract.employment_additional_info.annotation_history_empty_state_title": "Nenhum resultado encontrado",
|
|
14479
|
-
"hcm_contract.employment_additional_info.annotation_history_form_general_title": "Histórico de anotação",
|
|
14480
|
-
"hcm_contract.employment_additional_info.annotation_history_form_title": "Histórico de anotação",
|
|
14481
|
-
"hcm_contract.employment_additional_info.annotation_history_id": "Identificador único",
|
|
14482
|
-
"hcm_contract.employment_additional_info.annotation_history_list_grid_title": "Lista de históricos de anotação",
|
|
14483
|
-
"hcm_contract.employment_additional_info.annotation_history_list_title": "Histórico de anotação",
|
|
14484
|
-
"hcm_contract.employment_additional_info.annotation_history_responsible": "Responsável",
|
|
14485
|
-
"hcm_contract.employment_additional_info.annotation_history_responsible_search_title": "Responsável",
|
|
14486
|
-
"hcm_contract.employment_additional_info.annotation_history_type": "Tipo",
|
|
14487
|
-
"hcm_contract.employment_additional_info.annotation_history_type_code": "Tipo",
|
|
14488
|
-
"hcm_contract.employment_additional_info.annotation_history_type_name": "Descrição do tipo",
|
|
14489
|
-
"hcm_contract.employment_additional_info.annotation_history_type_search_title": "Tipo",
|
|
14490
|
-
"hcm_contract.employment_additional_info.annotation_history_employee_code": "Código",
|
|
14491
|
-
"hcm_contract.employment_additional_info.annotation_history_employee_person_nom_pes": "Nome do colaborador",
|
|
14492
|
-
"hcm_contract.employment_additional_info.annotation_history_employee_search_title": "Colaborador",
|
|
14493
|
-
"hcm_contract.employment_additional_info.employee_employment_relationship_contract_type": "Tipo de contrato",
|
|
14494
|
-
"hcm_contract.employment_additional_info.contract_type_aprentice": "Aprendiz",
|
|
14495
|
-
"hcm_contract.employment_additional_info.contract_type_director": "Diretor",
|
|
14496
|
-
"hcm_contract.employment_additional_info.contract_type_employee": "Empregado",
|
|
14497
|
-
"hcm_contract.employment_additional_info.contract_type_third_party": "Terceiro",
|
|
14498
|
-
"hcm_contract.employment_additional_info.contract_type_trainee": "Estagiário",
|
|
14499
|
-
"hcm_contract.employment_additional_info.employee_employer_cod_emp": "Código da empresa",
|
|
14500
|
-
"hcm_contract.employment_additional_info.employee_code": "Cadastro",
|
|
14501
|
-
"hcm_contract.employment_additional_info.employee_person_nom_pes": "Nome do colaborador",
|
|
14502
|
-
"hcm_contract.employment_additional_info.filter": "Filtrar",
|
|
14503
|
-
"hcm_contract.employment_additional_info.filters": "Filtros",
|
|
14504
|
-
"hcm_contract.employment_additional_info.total_records": "{{value}} registro(s) encontrado(s)",
|
|
14505
|
-
"hcm_contract.employment_additional_info.records_found": "registro(s) encontrado(s)",
|
|
14506
|
-
"hcm_contract.employment_additional_info.cancel": "Cancelar",
|
|
14507
|
-
"hcm_contract.employment_additional_info.select": "Selecionar",
|
|
14508
|
-
"hcm_contract.employment_additional_info.clear": "Limpar",
|
|
14509
|
-
"hcm_contract.employment_additional_info.annotation_type_code": "Tipo",
|
|
14510
|
-
"hcm_contract.employment_additional_info.annotation_type_name": "Descrição do tipo",
|
|
14511
|
-
"hcm_contract.employment_additional_info.saved_message_content": "Registro(s) salvo(s) com sucesso.",
|
|
14512
|
-
"hcm_contract.employment_additional_info.saved_message_title": "Sucesso",
|
|
14513
|
-
"hcm_contract.employment_additional_info.nothing_found": "Nenhum registro encontrado",
|
|
14514
|
-
"hcm_contract.employment_contract.add_employee_dependent": "Adicionar dependente",
|
|
14515
|
-
"hcm_contract.employment_contract.employee_dependent_list": "Dependentes",
|
|
14516
|
-
"hcm_contract.employment_contract.employee_dependent_list_kinship": "Parentesco"
|
|
14517
|
-
};
|
|
14518
|
-
|
|
14519
14488
|
var ESocialTrainingCodeType;
|
|
14520
14489
|
(function (ESocialTrainingCodeType) {
|
|
14521
14490
|
ESocialTrainingCodeType["V1006"] = "V1006";
|
|
@@ -14588,7 +14557,7 @@
|
|
|
14588
14557
|
RegulatoryNormTrainingHistoryListComponent.prototype.setStartDateValidator = function () {
|
|
14589
14558
|
var _this = this;
|
|
14590
14559
|
return function (control) {
|
|
14591
|
-
if (_this.personBirthDate && control.value && moment$
|
|
14560
|
+
if (_this.personBirthDate && control.value && moment$q(control.value).isBefore(moment$q(_this.personBirthDate), "day")) {
|
|
14592
14561
|
return { startDateBeforeBirthdate: true };
|
|
14593
14562
|
}
|
|
14594
14563
|
else {
|
|
@@ -14675,7 +14644,7 @@
|
|
|
14675
14644
|
if (this.formArray) {
|
|
14676
14645
|
this.formArray.controls.forEach(function (form) {
|
|
14677
14646
|
var control = form.get('startDate');
|
|
14678
|
-
if (_this.personBirthDate && control.value && moment$
|
|
14647
|
+
if (_this.personBirthDate && control.value && moment$q(control.value).isBefore(moment$q(_this.personBirthDate), "day")) {
|
|
14679
14648
|
control.setErrors({ startDateBeforeBirthdate: true });
|
|
14680
14649
|
}
|
|
14681
14650
|
else {
|
|
@@ -14999,6 +14968,27 @@
|
|
|
14999
14968
|
return EmployeeSummaryModule;
|
|
15000
14969
|
}());
|
|
15001
14970
|
|
|
14971
|
+
var DependentDraftService = /** @class */ (function (_super) {
|
|
14972
|
+
__extends(DependentDraftService, _super);
|
|
14973
|
+
function DependentDraftService(http, messageService, translate) {
|
|
14974
|
+
var _this = _super.call(this, http, messageService, "hcm_contract/employment_contract/entities/dependentDraft", "hcm_contract/employment_contract/actions", translate) || this;
|
|
14975
|
+
_this.http = http;
|
|
14976
|
+
_this.messageService = messageService;
|
|
14977
|
+
_this.translate = translate;
|
|
14978
|
+
_this.saveDraftEvent = new rxjs.Subject();
|
|
14979
|
+
return _this;
|
|
14980
|
+
}
|
|
14981
|
+
DependentDraftService.ctorParameters = function () { return [
|
|
14982
|
+
{ type: http.HttpClient },
|
|
14983
|
+
{ type: api.MessageService },
|
|
14984
|
+
{ type: core$1.TranslateService }
|
|
14985
|
+
]; };
|
|
14986
|
+
DependentDraftService = __decorate([
|
|
14987
|
+
core.Injectable()
|
|
14988
|
+
], DependentDraftService);
|
|
14989
|
+
return DependentDraftService;
|
|
14990
|
+
}(EntityService));
|
|
14991
|
+
|
|
15002
14992
|
var CountryService = /** @class */ (function (_super) {
|
|
15003
14993
|
__extends(CountryService, _super);
|
|
15004
14994
|
function CountryService(http, messageService, translate) {
|
|
@@ -15567,9 +15557,68 @@
|
|
|
15567
15557
|
return EmployeeDependentDocumentTabComponent;
|
|
15568
15558
|
}());
|
|
15569
15559
|
|
|
15560
|
+
var DependentDraft = /** @class */ (function () {
|
|
15561
|
+
function DependentDraft() {
|
|
15562
|
+
}
|
|
15563
|
+
DependentDraft.fromDto = function (dependentDraftDto) {
|
|
15564
|
+
var parse = (dependentDraftDto === null || dependentDraftDto === void 0 ? void 0 : dependentDraftDto.data) && JSON.parse(dependentDraftDto.data);
|
|
15565
|
+
var model = {
|
|
15566
|
+
basicDependentPersonData: parse.basicDependentPersonData ? this.normalizeDraft(parse.basicDependentPersonData) : {},
|
|
15567
|
+
documentDependentPersonData: parse.documentDependentPersonData ? this.normalizeDraft(parse.documentDependentPersonData) : {},
|
|
15568
|
+
complementDependentPersonData: parse.complementDependentPersonData
|
|
15569
|
+
? this.normalizeDraft(parse.complementDependentPersonData) : {},
|
|
15570
|
+
};
|
|
15571
|
+
return model;
|
|
15572
|
+
};
|
|
15573
|
+
DependentDraft.toDto = function (dependentDraft, employeeId, admissionDraftId) {
|
|
15574
|
+
var _a, _b;
|
|
15575
|
+
var dto = {};
|
|
15576
|
+
dto.personName = (_a = dependentDraft === null || dependentDraft === void 0 ? void 0 : dependentDraft.basicDependentPersonData) === null || _a === void 0 ? void 0 : _a.fullName;
|
|
15577
|
+
dto.kinshipDegreeType = (_b = dependentDraft === null || dependentDraft === void 0 ? void 0 : dependentDraft.complementDependentPersonData) === null || _b === void 0 ? void 0 : _b.kinshipDependentDegreeType;
|
|
15578
|
+
dto.employee = employeeId ? { id: employeeId } : null;
|
|
15579
|
+
dto.admissionDraft = admissionDraftId ? { id: admissionDraftId } : null;
|
|
15580
|
+
dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
|
|
15581
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
|
|
15582
|
+
dto.data = JSON.stringify({
|
|
15583
|
+
basicDependentPersonData: dependentDraft.basicDependentPersonData,
|
|
15584
|
+
documentDependentPersonData: dependentDraft.documentDependentPersonData,
|
|
15585
|
+
complementDependentPersonData: dependentDraft.complementDependentPersonData,
|
|
15586
|
+
});
|
|
15587
|
+
return dto;
|
|
15588
|
+
};
|
|
15589
|
+
DependentDraft.normalizeDraft = function (obj) {
|
|
15590
|
+
var _this = this;
|
|
15591
|
+
if (!obj || typeof obj !== "object") {
|
|
15592
|
+
return obj;
|
|
15593
|
+
}
|
|
15594
|
+
Object.keys(obj).forEach(function (key) {
|
|
15595
|
+
var value = obj[key];
|
|
15596
|
+
if (value === "") {
|
|
15597
|
+
obj[key] = null;
|
|
15598
|
+
return;
|
|
15599
|
+
}
|
|
15600
|
+
if (typeof value === "string" && /^\d{4}-\d{2}-\d{2}$/.test(value)) {
|
|
15601
|
+
var date = new Date(value + "T00:00:00");
|
|
15602
|
+
obj[key] = isNaN(date.getTime()) ? null : date;
|
|
15603
|
+
return;
|
|
15604
|
+
}
|
|
15605
|
+
if (typeof value === "string" && /^\d{4}-\d{2}-\d{2}T/.test(value)) {
|
|
15606
|
+
var date = new Date(value);
|
|
15607
|
+
obj[key] = isNaN(date.getTime()) ? null : date;
|
|
15608
|
+
return;
|
|
15609
|
+
}
|
|
15610
|
+
if (value && typeof value === "object") {
|
|
15611
|
+
_this.normalizeDraft(value);
|
|
15612
|
+
}
|
|
15613
|
+
});
|
|
15614
|
+
return obj;
|
|
15615
|
+
};
|
|
15616
|
+
return DependentDraft;
|
|
15617
|
+
}());
|
|
15618
|
+
|
|
15570
15619
|
function validateDate(dateS, format) {
|
|
15571
15620
|
if (format === void 0) { format = "DD/MM/YYYY"; }
|
|
15572
|
-
return moment$
|
|
15621
|
+
return moment$q(dateS, format).toDate();
|
|
15573
15622
|
}
|
|
15574
15623
|
function mapFormToDependentSave(ef, employeeId, dependentId, personId, dateFormat) {
|
|
15575
15624
|
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;
|
|
@@ -15581,7 +15630,7 @@
|
|
|
15581
15630
|
nickname: ((_c = ef === null || ef === void 0 ? void 0 : ef.basicDependentPersonData) === null || _c === void 0 ? void 0 : _c.nickname) || "",
|
|
15582
15631
|
genderType: ((_d = ef === null || ef === void 0 ? void 0 : ef.basicDependentPersonData) === null || _d === void 0 ? void 0 : _d.genderType) || null,
|
|
15583
15632
|
birthDate: ((_e = ef === null || ef === void 0 ? void 0 : ef.basicDependentPersonData) === null || _e === void 0 ? void 0 : _e.birthDate) ?
|
|
15584
|
-
moment$
|
|
15633
|
+
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,
|
|
15585
15634
|
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) || "",
|
|
15586
15635
|
kinshipDependentDegreeType: ((_j = ef === null || ef === void 0 ? void 0 : ef.complementDependentPersonData) === null || _j === void 0 ? void 0 : _j.kinshipDependentDegreeType) || null,
|
|
15587
15636
|
kinshipDegreeType: ((_k = ef === null || ef === void 0 ? void 0 : ef.complementDependentPersonData) === null || _k === void 0 ? void 0 : _k.kinshipDegreeType) || null,
|
|
@@ -15600,10 +15649,10 @@
|
|
|
15600
15649
|
rgIssuer: ((_x = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _x === void 0 ? void 0 : _x.rgIssuer) || "",
|
|
15601
15650
|
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,
|
|
15602
15651
|
rgIssueDate: ((_2 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _2 === void 0 ? void 0 : _2.rgIssueDate) ?
|
|
15603
|
-
moment$
|
|
15652
|
+
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,
|
|
15604
15653
|
civilCertificateType: ((_4 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _4 === void 0 ? void 0 : _4.civilCertificateType) || null,
|
|
15605
15654
|
civilCertificateIssueDate: ((_5 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _5 === void 0 ? void 0 : _5.civilCertificateIssueDate) ?
|
|
15606
|
-
moment$
|
|
15655
|
+
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,
|
|
15607
15656
|
civilCertificateRegisterNumber: ((_7 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _7 === void 0 ? void 0 : _7.civilCertificateRegisterNumber) || "",
|
|
15608
15657
|
civilCertificateTerm: ((_8 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _8 === void 0 ? void 0 : _8.civilCertificateTerm) || "",
|
|
15609
15658
|
civilCertificateBook: ((_9 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _9 === void 0 ? void 0 : _9.civilCertificateBook) || "",
|
|
@@ -15611,7 +15660,7 @@
|
|
|
15611
15660
|
civilCertificateNotaryOffice: ((_11 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _11 === void 0 ? void 0 : _11.civilCertificateNotaryOffice) || "",
|
|
15612
15661
|
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,
|
|
15613
15662
|
deathCertificateIssueDate: ((_16 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _16 === void 0 ? void 0 : _16.deathCertificateIssueDate) ?
|
|
15614
|
-
moment$
|
|
15663
|
+
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,
|
|
15615
15664
|
deathCertificateRegisterNumber: ((_18 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _18 === void 0 ? void 0 : _18.deathCertificateRegisterNumber) || "",
|
|
15616
15665
|
deathCertificateNumber: ((_19 = ef === null || ef === void 0 ? void 0 : ef.documentDependentPersonData) === null || _19 === void 0 ? void 0 : _19.deathCertificateNumber) || ""
|
|
15617
15666
|
};
|
|
@@ -15634,7 +15683,7 @@
|
|
|
15634
15683
|
fullName: personRetrieve.basicData.fullName,
|
|
15635
15684
|
nickname: personRetrieve.basicData.nickname || null,
|
|
15636
15685
|
genderType: personRetrieve.basicData.genderType,
|
|
15637
|
-
birthDate: ((_a = personRetrieve.basicData) === null || _a === void 0 ? void 0 : _a.birthDate) && moment$
|
|
15686
|
+
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),
|
|
15638
15687
|
email: Array.isArray((_c = personRetrieve.emailData) === null || _c === void 0 ? void 0 : _c.email) ?
|
|
15639
15688
|
personRetrieve.emailData.email.join(", ") : ((_d = personRetrieve.emailData) === null || _d === void 0 ? void 0 : _d.email) || null,
|
|
15640
15689
|
};
|
|
@@ -15655,16 +15704,16 @@
|
|
|
15655
15704
|
rgNumber: ((_u = personRetrieve.nationalityData) === null || _u === void 0 ? void 0 : _u.rgNumber) || null,
|
|
15656
15705
|
rgIssuer: ((_v = personRetrieve.nationalityData) === null || _v === void 0 ? void 0 : _v.rgIssuer) || null,
|
|
15657
15706
|
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 }) : {},
|
|
15658
|
-
rgIssueDate: ((_3 = personRetrieve.nationalityData) === null || _3 === void 0 ? void 0 : _3.rgIssueDate) && moment$
|
|
15707
|
+
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"),
|
|
15659
15708
|
civilCertificateType: ((_5 = personRetrieve.additionalData) === null || _5 === void 0 ? void 0 : _5.civilCertificateType) || "",
|
|
15660
|
-
civilCertificateIssueDate: ((_6 = personRetrieve.additionalData) === null || _6 === void 0 ? void 0 : _6.civilCertificateIssueDate) && moment$
|
|
15709
|
+
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"),
|
|
15661
15710
|
civilCertificateRegisterNumber: ((_8 = personRetrieve.additionalData) === null || _8 === void 0 ? void 0 : _8.civilCertificateRegisterNumber) || "",
|
|
15662
15711
|
civilCertificateTerm: ((_9 = personRetrieve.additionalData) === null || _9 === void 0 ? void 0 : _9.civilCertificateTerm) || "",
|
|
15663
15712
|
civilCertificateBook: ((_10 = personRetrieve.additionalData) === null || _10 === void 0 ? void 0 : _10.civilCertificateBook) || "",
|
|
15664
15713
|
civilCertificatePage: ((_11 = personRetrieve.additionalData) === null || _11 === void 0 ? void 0 : _11.civilCertificatePage) || "",
|
|
15665
15714
|
civilCertificateNotaryOffice: ((_12 = personRetrieve.additionalData) === null || _12 === void 0 ? void 0 : _12.civilCertificateNotaryOffice) || "",
|
|
15666
15715
|
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 }) : {},
|
|
15667
|
-
deathCertificateIssueDate: ((_19 = personRetrieve.additionalData) === null || _19 === void 0 ? void 0 : _19.deathCertificateIssueDate) && moment$
|
|
15716
|
+
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"),
|
|
15668
15717
|
deathCertificateRegisterNumber: ((_21 = personRetrieve.additionalData) === null || _21 === void 0 ? void 0 : _21.deathCertificateRegisterNumber) || "",
|
|
15669
15718
|
deathCertificateNumber: ((_22 = personRetrieve.additionalData) === null || _22 === void 0 ? void 0 : _22.deathCertificateNumber) || ""
|
|
15670
15719
|
};
|
|
@@ -15681,18 +15730,21 @@
|
|
|
15681
15730
|
}
|
|
15682
15731
|
|
|
15683
15732
|
var EmployeeDependentFormComponent = /** @class */ (function () {
|
|
15684
|
-
function EmployeeDependentFormComponent(translateService, employeeDependentService, sUrlService, focusService, route, confirmationService, messageService) {
|
|
15733
|
+
function EmployeeDependentFormComponent(translateService, employeeDependentService, sUrlService, focusService, dependentDraftService, route, confirmationService, messageService) {
|
|
15685
15734
|
this.translateService = translateService;
|
|
15686
15735
|
this.employeeDependentService = employeeDependentService;
|
|
15687
15736
|
this.sUrlService = sUrlService;
|
|
15688
15737
|
this.focusService = focusService;
|
|
15738
|
+
this.dependentDraftService = dependentDraftService;
|
|
15689
15739
|
this.route = route;
|
|
15690
15740
|
this.confirmationService = confirmationService;
|
|
15691
15741
|
this.messageService = messageService;
|
|
15692
15742
|
this.loading = false;
|
|
15693
15743
|
this.showSideBar = false;
|
|
15694
15744
|
this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.employee_dependent_button_next");
|
|
15695
|
-
this.formGroup = new forms.FormGroup({
|
|
15745
|
+
this.formGroup = new forms.FormGroup({
|
|
15746
|
+
draftId: new forms.FormControl(null),
|
|
15747
|
+
});
|
|
15696
15748
|
this.ngUnsubscribe = new rxjs.Subject();
|
|
15697
15749
|
this.createSteps();
|
|
15698
15750
|
}
|
|
@@ -15710,29 +15762,135 @@
|
|
|
15710
15762
|
this.localeConfig = data.localeConfig;
|
|
15711
15763
|
this.dateFormat = DateValidator.getDateFormatFromCalendar(data.localeConfig.calendar);
|
|
15712
15764
|
};
|
|
15765
|
+
EmployeeDependentFormComponent.prototype.undoStep = function () {
|
|
15766
|
+
if (this.activeIndex === 1) {
|
|
15767
|
+
this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.employee_dependent_button_next");
|
|
15768
|
+
}
|
|
15769
|
+
else if (this.activeIndex === 0) {
|
|
15770
|
+
return;
|
|
15771
|
+
}
|
|
15772
|
+
this.activeIndex--;
|
|
15773
|
+
};
|
|
15774
|
+
EmployeeDependentFormComponent.prototype.nextStep = function () {
|
|
15775
|
+
if (this.activeIndex === 0) {
|
|
15776
|
+
var formBasicStep = this.formGroup.get("basicDependentPersonData");
|
|
15777
|
+
this.validateAllFormFields(formBasicStep);
|
|
15778
|
+
if (!formBasicStep.valid && !this.dependentId) {
|
|
15779
|
+
this.steps[1].disabled = true;
|
|
15780
|
+
return this.messageService.add({
|
|
15781
|
+
severity: "error",
|
|
15782
|
+
summary: this.translateService.instant("hcm_contract.employment_contract.error"),
|
|
15783
|
+
detail: this.translateService.instant("hcm_contract.employment_contract.admission_generic_invalid_form_group"),
|
|
15784
|
+
});
|
|
15785
|
+
}
|
|
15786
|
+
this.steps[1].disabled = false;
|
|
15787
|
+
this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.admission_employee_form_btn_step_last");
|
|
15788
|
+
this.activeIndex++;
|
|
15789
|
+
}
|
|
15790
|
+
else if (this.activeIndex === 1) {
|
|
15791
|
+
this.validateAllFormFields(this.formGroup);
|
|
15792
|
+
if (!this.formGroup.valid) {
|
|
15793
|
+
var msg = this.requiredFieldsStep1 ? this.translateService.instant("hcm_contract.employment_contract.admission_generic_invalid_form_group_step_1")
|
|
15794
|
+
: this.translateService.instant("hcm_contract.employment_contract.admission_generic_invalid_form_group");
|
|
15795
|
+
return this.messageService.add({
|
|
15796
|
+
severity: "error",
|
|
15797
|
+
summary: this.translateService.instant("hcm_contract.employment_contract.error"),
|
|
15798
|
+
detail: msg,
|
|
15799
|
+
});
|
|
15800
|
+
}
|
|
15801
|
+
if (this.dependentId) {
|
|
15802
|
+
this.onBeforeSave();
|
|
15803
|
+
}
|
|
15804
|
+
else {
|
|
15805
|
+
this.onSaveDependent();
|
|
15806
|
+
}
|
|
15807
|
+
}
|
|
15808
|
+
};
|
|
15809
|
+
EmployeeDependentFormComponent.prototype.isNew = function () {
|
|
15810
|
+
return !this.dependentId;
|
|
15811
|
+
};
|
|
15812
|
+
EmployeeDependentFormComponent.prototype.isNewToLabel = function () {
|
|
15813
|
+
return this.isNew() ? "create" : "edit";
|
|
15814
|
+
};
|
|
15815
|
+
EmployeeDependentFormComponent.prototype.onStepSelected = function (event) {
|
|
15816
|
+
if (event.index === 0) {
|
|
15817
|
+
var complementForm = this.formGroup.get("complementDependentPersonData");
|
|
15818
|
+
if (!complementForm.valid && (!this.dependentId)) {
|
|
15819
|
+
this.validateAllFormFields(complementForm);
|
|
15820
|
+
return;
|
|
15821
|
+
}
|
|
15822
|
+
this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.employee_dependent_button_next");
|
|
15823
|
+
}
|
|
15824
|
+
if (event.index === 1) {
|
|
15825
|
+
var basicForm = this.formGroup.get("basicDependentPersonData");
|
|
15826
|
+
if (!basicForm.valid && (!this.dependentId)) {
|
|
15827
|
+
this.validateAllFormFields(basicForm);
|
|
15828
|
+
return;
|
|
15829
|
+
}
|
|
15830
|
+
}
|
|
15831
|
+
this.activeIndex = event.index;
|
|
15832
|
+
};
|
|
15833
|
+
EmployeeDependentFormComponent.prototype.onCancel = function () {
|
|
15834
|
+
this.showSideBar = false;
|
|
15835
|
+
};
|
|
15836
|
+
EmployeeDependentFormComponent.prototype.saveDependentDraft = function () {
|
|
15837
|
+
var _this = this;
|
|
15838
|
+
validateSpecificControls(this.formGroup, [
|
|
15839
|
+
"basicDependentPersonData.fullName",
|
|
15840
|
+
"complementDependentPersonData.kinshipDependentDegreeType",
|
|
15841
|
+
]);
|
|
15842
|
+
var fullName = this.formGroup.get("basicDependentPersonData.fullName");
|
|
15843
|
+
var kinshipDependentDegreeType = this.formGroup.get("complementDependentPersonData.kinshipDependentDegreeType");
|
|
15844
|
+
if ((this.activeIndex === 0 && !fullName.valid)
|
|
15845
|
+
|| (this.activeIndex === 1 && !kinshipDependentDegreeType.valid)) {
|
|
15846
|
+
return;
|
|
15847
|
+
}
|
|
15848
|
+
else if (fullName.valid && this.activeIndex === 0) {
|
|
15849
|
+
this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.admission_employee_form_btn_step_last");
|
|
15850
|
+
return this.activeIndex++;
|
|
15851
|
+
}
|
|
15852
|
+
this.loading = true;
|
|
15853
|
+
this.getSaveObservable()
|
|
15854
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe), operators.finalize(function () { return _this.loading = false; }))
|
|
15855
|
+
.subscribe(function (res) {
|
|
15856
|
+
_this.formGroup.get("draftId").setValue(res === null || res === void 0 ? void 0 : res.id);
|
|
15857
|
+
_this.messageService.add({
|
|
15858
|
+
severity: "success",
|
|
15859
|
+
summary: _this.translateService.instant("hcm_contract.employment_contract.admission_generic_toast_success"),
|
|
15860
|
+
detail: _this.translateService.instant("hcm_contract.employment_contract.admission_draft_employee_form_save_sucess"),
|
|
15861
|
+
});
|
|
15862
|
+
_this.showSideBar = false;
|
|
15863
|
+
_this.closeSideBar.emit(true);
|
|
15864
|
+
});
|
|
15865
|
+
};
|
|
15713
15866
|
EmployeeDependentFormComponent.prototype.subscribeEvents = function () {
|
|
15714
15867
|
var _this = this;
|
|
15715
15868
|
this.employeeDependentService.getOpenSideBarAndStartForm()
|
|
15869
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
15716
15870
|
.subscribe(function (data) {
|
|
15717
15871
|
_this.activeIndex = 0;
|
|
15718
15872
|
_this.buttonLabel = _this.translateService.instant("hcm_contract.employment_contract.employee_dependent_button_next");
|
|
15719
15873
|
_this.dependentId = data === null || data === void 0 ? void 0 : data.dependentId;
|
|
15720
15874
|
_this.personId = data === null || data === void 0 ? void 0 : data.personId;
|
|
15721
15875
|
_this.formGroup.reset();
|
|
15722
|
-
if (!(data === null || data === void 0 ? void 0 : data.dependentId)) {
|
|
15876
|
+
if (!(data === null || data === void 0 ? void 0 : data.dependentId) && !data.dependentDraftId) {
|
|
15723
15877
|
_this.steps[1].disabled = true;
|
|
15724
15878
|
_this.formGroup.enable();
|
|
15725
15879
|
if (data.personId) {
|
|
15726
15880
|
_this.personRetrieveInformation();
|
|
15727
15881
|
}
|
|
15728
15882
|
}
|
|
15729
|
-
else {
|
|
15883
|
+
else if ((data === null || data === void 0 ? void 0 : data.personId) && !data.dependentDraftId) {
|
|
15730
15884
|
_this.personRetrieveInformation();
|
|
15731
15885
|
_this.steps[0].disabled = false;
|
|
15732
15886
|
_this.steps[1].disabled = false;
|
|
15733
15887
|
}
|
|
15888
|
+
else if (data === null || data === void 0 ? void 0 : data.dependentDraftId) {
|
|
15889
|
+
_this.loadDraft(data.dependentDraftId);
|
|
15890
|
+
}
|
|
15734
15891
|
_this.showSideBar = true;
|
|
15735
15892
|
});
|
|
15893
|
+
this.onSaveByListDraft();
|
|
15736
15894
|
};
|
|
15737
15895
|
EmployeeDependentFormComponent.prototype.createSteps = function () {
|
|
15738
15896
|
var personalData = {
|
|
@@ -15774,13 +15932,29 @@
|
|
|
15774
15932
|
.pipe(operators.takeUntil(this.ngUnsubscribe), operators.finalize(function () {
|
|
15775
15933
|
_this.loading = false;
|
|
15776
15934
|
})).subscribe(function (data) {
|
|
15935
|
+
var _a;
|
|
15936
|
+
var draftId = (_a = _this.formGroup.get("draftId")) === null || _a === void 0 ? void 0 : _a.value;
|
|
15777
15937
|
if (data === null || data === void 0 ? void 0 : data.id) {
|
|
15778
15938
|
_this.addMessageSucess();
|
|
15779
15939
|
_this.showSideBar = false;
|
|
15780
15940
|
_this.closeSideBar.emit(true);
|
|
15941
|
+
if (draftId) {
|
|
15942
|
+
_this.deleteDraft(draftId);
|
|
15943
|
+
}
|
|
15781
15944
|
}
|
|
15782
15945
|
});
|
|
15783
15946
|
};
|
|
15947
|
+
EmployeeDependentFormComponent.prototype.deleteDraft = function (draftId) {
|
|
15948
|
+
var _this = this;
|
|
15949
|
+
this.loading = true;
|
|
15950
|
+
this.dependentDraftService.delete(draftId)
|
|
15951
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe), operators.finalize(function () {
|
|
15952
|
+
_this.loading = false;
|
|
15953
|
+
}))
|
|
15954
|
+
.subscribe(function () {
|
|
15955
|
+
_this.closeSideBar.emit(true);
|
|
15956
|
+
});
|
|
15957
|
+
};
|
|
15784
15958
|
EmployeeDependentFormComponent.prototype.addMessageSucess = function () {
|
|
15785
15959
|
this.messageService.add({
|
|
15786
15960
|
severity: "success",
|
|
@@ -15801,47 +15975,9 @@
|
|
|
15801
15975
|
});
|
|
15802
15976
|
this.focusService.focusFirstInvalidInput();
|
|
15803
15977
|
};
|
|
15804
|
-
EmployeeDependentFormComponent.prototype.
|
|
15805
|
-
|
|
15806
|
-
|
|
15807
|
-
}
|
|
15808
|
-
else if (this.activeIndex === 0) {
|
|
15809
|
-
return;
|
|
15810
|
-
}
|
|
15811
|
-
this.activeIndex--;
|
|
15812
|
-
};
|
|
15813
|
-
EmployeeDependentFormComponent.prototype.nextStep = function () {
|
|
15814
|
-
if (this.activeIndex === 0) {
|
|
15815
|
-
var formBasicStep = this.formGroup.get("basicDependentPersonData");
|
|
15816
|
-
this.validateAllFormFields(formBasicStep);
|
|
15817
|
-
if (!formBasicStep.valid && !this.dependentId) {
|
|
15818
|
-
this.steps[1].disabled = true;
|
|
15819
|
-
return this.messageService.add({
|
|
15820
|
-
severity: "error",
|
|
15821
|
-
summary: this.translateService.instant("hcm_contract.employment_contract.error"),
|
|
15822
|
-
detail: this.translateService.instant("hcm_contract.employment_contract.admission_generic_invalid_form_group"),
|
|
15823
|
-
});
|
|
15824
|
-
}
|
|
15825
|
-
this.steps[1].disabled = false;
|
|
15826
|
-
this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.save");
|
|
15827
|
-
this.activeIndex++;
|
|
15828
|
-
}
|
|
15829
|
-
else if (this.activeIndex === 1) {
|
|
15830
|
-
this.validateAllFormFields(this.formGroup);
|
|
15831
|
-
if (!this.formGroup.valid) {
|
|
15832
|
-
return this.messageService.add({
|
|
15833
|
-
severity: "error",
|
|
15834
|
-
summary: this.translateService.instant("hcm_contract.employment_contract.error"),
|
|
15835
|
-
detail: this.translateService.instant("hcm_contract.employment_contract.admission_generic_invalid_form_group"),
|
|
15836
|
-
});
|
|
15837
|
-
}
|
|
15838
|
-
if (this.dependentId) {
|
|
15839
|
-
this.onBeforeSave();
|
|
15840
|
-
}
|
|
15841
|
-
else {
|
|
15842
|
-
this.onSaveDependent();
|
|
15843
|
-
}
|
|
15844
|
-
}
|
|
15978
|
+
EmployeeDependentFormComponent.prototype.requiredFieldsStep1 = function () {
|
|
15979
|
+
var _a, _b, _c, _d;
|
|
15980
|
+
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);
|
|
15845
15981
|
};
|
|
15846
15982
|
EmployeeDependentFormComponent.prototype.isFormChanged = function (beforeData, afterData) {
|
|
15847
15983
|
if (!(beforeData === null || beforeData === void 0 ? void 0 : beforeData.personDependentData) || !afterData) {
|
|
@@ -15850,7 +15986,7 @@
|
|
|
15850
15986
|
var keysToCheck = [
|
|
15851
15987
|
"basicDependentPersonData",
|
|
15852
15988
|
"complementDependentPersonData",
|
|
15853
|
-
"documentDependentPersonData"
|
|
15989
|
+
"documentDependentPersonData",
|
|
15854
15990
|
];
|
|
15855
15991
|
return keysToCheck.some(function (formGroup) {
|
|
15856
15992
|
return Object.keys(beforeData.personDependentData[formGroup] || {}).some(function (key) {
|
|
@@ -15861,33 +15997,6 @@
|
|
|
15861
15997
|
});
|
|
15862
15998
|
});
|
|
15863
15999
|
};
|
|
15864
|
-
EmployeeDependentFormComponent.prototype.isNew = function () {
|
|
15865
|
-
return !this.dependentId;
|
|
15866
|
-
};
|
|
15867
|
-
EmployeeDependentFormComponent.prototype.isNewToLabel = function () {
|
|
15868
|
-
return this.isNew() ? "create" : "edit";
|
|
15869
|
-
};
|
|
15870
|
-
EmployeeDependentFormComponent.prototype.onStepSelected = function (event) {
|
|
15871
|
-
if (event.index === 0) {
|
|
15872
|
-
var complementForm = this.formGroup.get("complementDependentPersonData");
|
|
15873
|
-
if (!complementForm.valid && (!this.dependentId)) {
|
|
15874
|
-
this.validateAllFormFields(complementForm);
|
|
15875
|
-
return;
|
|
15876
|
-
}
|
|
15877
|
-
this.buttonLabel = this.translateService.instant("hcm_contract.employment_contract.employee_dependent_button_next");
|
|
15878
|
-
}
|
|
15879
|
-
if (event.index === 1) {
|
|
15880
|
-
var basicForm = this.formGroup.get("basicDependentPersonData");
|
|
15881
|
-
if (!basicForm.valid && (!this.dependentId)) {
|
|
15882
|
-
this.validateAllFormFields(basicForm);
|
|
15883
|
-
return;
|
|
15884
|
-
}
|
|
15885
|
-
}
|
|
15886
|
-
this.activeIndex = event.index;
|
|
15887
|
-
};
|
|
15888
|
-
EmployeeDependentFormComponent.prototype.onCancel = function () {
|
|
15889
|
-
this.showSideBar = false;
|
|
15890
|
-
};
|
|
15891
16000
|
EmployeeDependentFormComponent.prototype.onBeforeSave = function () {
|
|
15892
16001
|
var _this = this;
|
|
15893
16002
|
if (!this.formGroup.dirty || !this.isFormChanged(this.loadedDependent, this.formGroup.getRawValue())) {
|
|
@@ -15908,11 +16017,53 @@
|
|
|
15908
16017
|
this.closeSideBar.emit(true);
|
|
15909
16018
|
this.addMessageSucess();
|
|
15910
16019
|
};
|
|
16020
|
+
EmployeeDependentFormComponent.prototype.loadDraft = function (draftId) {
|
|
16021
|
+
var _this = this;
|
|
16022
|
+
this.loading = true;
|
|
16023
|
+
this.dependentDraftService.get(draftId)
|
|
16024
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe), operators.finalize(function () {
|
|
16025
|
+
_this.loading = false;
|
|
16026
|
+
}))
|
|
16027
|
+
.subscribe(function (draft) {
|
|
16028
|
+
var _a;
|
|
16029
|
+
(_a = _this.formGroup.get("draftId")) === null || _a === void 0 ? void 0 : _a.setValue(draftId);
|
|
16030
|
+
var data = DependentDraft.fromDto(draft);
|
|
16031
|
+
_this.formGroup.patchValue(data);
|
|
16032
|
+
});
|
|
16033
|
+
};
|
|
16034
|
+
EmployeeDependentFormComponent.prototype.getSaveObservable = function () {
|
|
16035
|
+
var _a;
|
|
16036
|
+
var form = this.formGroup.getRawValue();
|
|
16037
|
+
var dto = DependentDraft.toDto(form, this.employeeId, this.admissionDraft);
|
|
16038
|
+
var observable;
|
|
16039
|
+
var id = (_a = this.formGroup.get("draftId")) === null || _a === void 0 ? void 0 : _a.value;
|
|
16040
|
+
if (id) {
|
|
16041
|
+
observable = this.dependentDraftService.update(id, dto);
|
|
16042
|
+
}
|
|
16043
|
+
else {
|
|
16044
|
+
observable = this.dependentDraftService.insert(dto);
|
|
16045
|
+
}
|
|
16046
|
+
return observable;
|
|
16047
|
+
};
|
|
16048
|
+
EmployeeDependentFormComponent.prototype.onSaveByListDraft = function () {
|
|
16049
|
+
var _this = this;
|
|
16050
|
+
this.dependentDraftService.saveDraftEvent
|
|
16051
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
16052
|
+
.subscribe(function (formData) {
|
|
16053
|
+
_this.loading = true;
|
|
16054
|
+
if (formData) {
|
|
16055
|
+
var data = DependentDraft.fromDto(formData);
|
|
16056
|
+
_this.formGroup.patchValue(data);
|
|
16057
|
+
_this.onSaveDependent();
|
|
16058
|
+
}
|
|
16059
|
+
});
|
|
16060
|
+
};
|
|
15911
16061
|
EmployeeDependentFormComponent.ctorParameters = function () { return [
|
|
15912
16062
|
{ type: core$1.TranslateService },
|
|
15913
16063
|
{ type: EmployeeDependentService },
|
|
15914
16064
|
{ type: angularComponents$1.SUrlService },
|
|
15915
16065
|
{ type: FocusService },
|
|
16066
|
+
{ type: DependentDraftService },
|
|
15916
16067
|
{ type: router.ActivatedRoute },
|
|
15917
16068
|
{ type: api.ConfirmationService },
|
|
15918
16069
|
{ type: api.MessageService }
|
|
@@ -15920,6 +16071,9 @@
|
|
|
15920
16071
|
__decorate([
|
|
15921
16072
|
core.Input()
|
|
15922
16073
|
], EmployeeDependentFormComponent.prototype, "employeeId", void 0);
|
|
16074
|
+
__decorate([
|
|
16075
|
+
core.Input()
|
|
16076
|
+
], EmployeeDependentFormComponent.prototype, "admissionDraft", void 0);
|
|
15923
16077
|
__decorate([
|
|
15924
16078
|
core.Input()
|
|
15925
16079
|
], EmployeeDependentFormComponent.prototype, "closeSideBar", void 0);
|
|
@@ -15927,7 +16081,7 @@
|
|
|
15927
16081
|
core.Component({
|
|
15928
16082
|
// tslint:disable-next-line:component-selector
|
|
15929
16083
|
selector: "fnd-employee-dependent-form",
|
|
15930
|
-
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\"
|
|
16084
|
+
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",
|
|
15931
16085
|
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}"]
|
|
15932
16086
|
})
|
|
15933
16087
|
], EmployeeDependentFormComponent);
|
|
@@ -15940,7 +16094,7 @@
|
|
|
15940
16094
|
EnumTipSex["VM"] = "VM";
|
|
15941
16095
|
})(EnumTipSex || (EnumTipSex = {}));
|
|
15942
16096
|
|
|
15943
|
-
var moment$n = moment$
|
|
16097
|
+
var moment$n = moment$q; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
15944
16098
|
var EmployeeDependentPersonalStepComponent = /** @class */ (function () {
|
|
15945
16099
|
function EmployeeDependentPersonalStepComponent(translateService, route, formBuilder, service) {
|
|
15946
16100
|
var _this = this;
|
|
@@ -16029,7 +16183,226 @@
|
|
|
16029
16183
|
return EmployeeDependentPersonalStepComponent;
|
|
16030
16184
|
}());
|
|
16031
16185
|
|
|
16032
|
-
var moment$o = moment$
|
|
16186
|
+
var moment$o = moment$q;
|
|
16187
|
+
var DependentListDraftComponent = /** @class */ (function () {
|
|
16188
|
+
function DependentListDraftComponent(activatedRoute, paginatorStorageService, dependentDraftService, translate, router, confirmationService, messageService) {
|
|
16189
|
+
this.activatedRoute = activatedRoute;
|
|
16190
|
+
this.paginatorStorageService = paginatorStorageService;
|
|
16191
|
+
this.dependentDraftService = dependentDraftService;
|
|
16192
|
+
this.translate = translate;
|
|
16193
|
+
this.router = router;
|
|
16194
|
+
this.confirmationService = confirmationService;
|
|
16195
|
+
this.messageService = messageService;
|
|
16196
|
+
this.isLoading = false;
|
|
16197
|
+
this.allPermissions = {};
|
|
16198
|
+
this.currentListParams = { page: 0, size: 10, sort: [] };
|
|
16199
|
+
this.permissions = {};
|
|
16200
|
+
this.closeSideBar = new core.EventEmitter();
|
|
16201
|
+
this.addButtonClicked = new core.EventEmitter();
|
|
16202
|
+
this.onEdit = new core.EventEmitter();
|
|
16203
|
+
this.ngUnsubscribe = new rxjs.Subject();
|
|
16204
|
+
}
|
|
16205
|
+
DependentListDraftComponent.prototype.ngOnInit = function () {
|
|
16206
|
+
var _this = this;
|
|
16207
|
+
this.gridColumns = this.getGridColumns();
|
|
16208
|
+
this.activatedRoute
|
|
16209
|
+
.data.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (data) { return _this.onRouteDataChange(data); });
|
|
16210
|
+
this.closeSideBar
|
|
16211
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe), operators.filter(function (value) { return !!value; }))
|
|
16212
|
+
.subscribe(function () {
|
|
16213
|
+
_this.updateGrid();
|
|
16214
|
+
});
|
|
16215
|
+
};
|
|
16216
|
+
DependentListDraftComponent.prototype.ngOnDestroy = function () {
|
|
16217
|
+
this.ngUnsubscribe.next();
|
|
16218
|
+
this.ngUnsubscribe.complete();
|
|
16219
|
+
};
|
|
16220
|
+
DependentListDraftComponent.prototype.onRouteDataChange = function (data) {
|
|
16221
|
+
var _a;
|
|
16222
|
+
this.allPermissions = data.allPermissions;
|
|
16223
|
+
this.permissions = (_a = data.allPermissions) === null || _a === void 0 ? void 0 : _a.dependentDraft;
|
|
16224
|
+
};
|
|
16225
|
+
DependentListDraftComponent.prototype.getActions = function (data) {
|
|
16226
|
+
var _this = this;
|
|
16227
|
+
return [
|
|
16228
|
+
{
|
|
16229
|
+
id: "1",
|
|
16230
|
+
label: this.translate.instant("hcm_contract.employment_contract.admission_generic_edit"),
|
|
16231
|
+
visible: this.permissions.editar,
|
|
16232
|
+
command: function () {
|
|
16233
|
+
_this.onEdit.emit(data === null || data === void 0 ? void 0 : data.id);
|
|
16234
|
+
},
|
|
16235
|
+
},
|
|
16236
|
+
{
|
|
16237
|
+
id: "2",
|
|
16238
|
+
visible: this.permissions.excluir,
|
|
16239
|
+
label: this.translate.instant("hcm_contract.employment_contract.logical_delete"),
|
|
16240
|
+
command: function () { return _this.onDelete(data.id); },
|
|
16241
|
+
},
|
|
16242
|
+
{
|
|
16243
|
+
id: "3",
|
|
16244
|
+
visible: this.permissions.incluir,
|
|
16245
|
+
label: this.translate.instant("hcm_contract.employment_contract.dependent_draft_effect_data"),
|
|
16246
|
+
command: function () {
|
|
16247
|
+
_this.dependentDraftService.saveDraftEvent.next(data);
|
|
16248
|
+
},
|
|
16249
|
+
},
|
|
16250
|
+
];
|
|
16251
|
+
};
|
|
16252
|
+
DependentListDraftComponent.prototype.onDelete = function (id) {
|
|
16253
|
+
var _this = this;
|
|
16254
|
+
this.confirmationService.confirm({
|
|
16255
|
+
header: this.translate.instant("hcm_contract.employment_contract.draft_delete_confirmation_message"),
|
|
16256
|
+
message: this.translate.instant("hcm_contract.employment_contract.admission_delete_confirmation_message"),
|
|
16257
|
+
acceptLabel: this.translate.instant("hcm_contract.employment_contract.admission_generic_yes"),
|
|
16258
|
+
rejectLabel: this.translate.instant("hcm_contract.employment_contract.admission_generic_no"),
|
|
16259
|
+
accept: function () {
|
|
16260
|
+
_this.isLoading = true;
|
|
16261
|
+
_this.dependentDraftService.delete(id)
|
|
16262
|
+
.pipe(operators.takeUntil(_this.ngUnsubscribe), operators.finalize(function () {
|
|
16263
|
+
_this.isLoading = false;
|
|
16264
|
+
_this.resetGrid();
|
|
16265
|
+
}))
|
|
16266
|
+
.subscribe(function () {
|
|
16267
|
+
_this.messageService.add({
|
|
16268
|
+
severity: "success",
|
|
16269
|
+
summary: _this.translate.instant("hcm_contract.employment_contract.deleted_message_title"),
|
|
16270
|
+
detail: _this.translate.instant("hcm_contract.employment_contract.deleted_message_content"),
|
|
16271
|
+
});
|
|
16272
|
+
});
|
|
16273
|
+
},
|
|
16274
|
+
});
|
|
16275
|
+
};
|
|
16276
|
+
DependentListDraftComponent.prototype.getSortField = function () {
|
|
16277
|
+
return this.currentListParams.sort;
|
|
16278
|
+
};
|
|
16279
|
+
DependentListDraftComponent.prototype.getPageSize = function () {
|
|
16280
|
+
return this.currentListParams.size;
|
|
16281
|
+
};
|
|
16282
|
+
DependentListDraftComponent.prototype.getRowIndex = function () {
|
|
16283
|
+
return this.currentListParams.page * this.currentListParams.size;
|
|
16284
|
+
};
|
|
16285
|
+
DependentListDraftComponent.prototype.formatDate = function (date) {
|
|
16286
|
+
return moment$o(date).format(this.dateFormat);
|
|
16287
|
+
};
|
|
16288
|
+
DependentListDraftComponent.prototype.onGridChange = function (event) {
|
|
16289
|
+
var size = event.rows;
|
|
16290
|
+
var page = event.first / size;
|
|
16291
|
+
var sort = event.multiSortMeta;
|
|
16292
|
+
if (size !== 10 || page !== 0 || (sort === null || sort === void 0 ? void 0 : sort.length) > 0) {
|
|
16293
|
+
this.paginatorStorageService.storePaginator("DependentDraftListComponentPaginator", {
|
|
16294
|
+
page: page,
|
|
16295
|
+
size: size,
|
|
16296
|
+
sort: sort,
|
|
16297
|
+
});
|
|
16298
|
+
}
|
|
16299
|
+
return this.updateGrid({ page: page, size: size, sort: sort });
|
|
16300
|
+
};
|
|
16301
|
+
DependentListDraftComponent.prototype.resetGrid = function (listParams) {
|
|
16302
|
+
if (listParams) {
|
|
16303
|
+
this.currentListParams = __assign(__assign({}, this.currentListParams), listParams);
|
|
16304
|
+
}
|
|
16305
|
+
this.currentListParams = __assign(__assign({}, this.currentListParams), { page: 0, sort: [] });
|
|
16306
|
+
this.table.reset();
|
|
16307
|
+
};
|
|
16308
|
+
DependentListDraftComponent.prototype.getGridColumns = function () {
|
|
16309
|
+
var gridColumnsGeneral = [
|
|
16310
|
+
{
|
|
16311
|
+
field: "personName",
|
|
16312
|
+
header: this.translate.instant("hcm_contract.employment_contract.e_001_pes_nom_pes"),
|
|
16313
|
+
},
|
|
16314
|
+
{
|
|
16315
|
+
field: "kinshipDegreeType",
|
|
16316
|
+
header: this.translate.instant("hcm_contract.employment_contract.employee_dependent_list_kinship"),
|
|
16317
|
+
}
|
|
16318
|
+
];
|
|
16319
|
+
return gridColumnsGeneral;
|
|
16320
|
+
};
|
|
16321
|
+
DependentListDraftComponent.prototype.updateGrid = function (listParams) {
|
|
16322
|
+
var _this = this;
|
|
16323
|
+
if (listParams === void 0) { listParams = {}; }
|
|
16324
|
+
if (!this._admissionDraftId && !this._employeeId) {
|
|
16325
|
+
return;
|
|
16326
|
+
}
|
|
16327
|
+
this.isLoading = true;
|
|
16328
|
+
this.currentListParams = __assign(__assign({}, this.currentListParams), listParams);
|
|
16329
|
+
var _a = this.currentListParams, page = _a.page, size = _a.size;
|
|
16330
|
+
var sort = this.currentListParams.sort;
|
|
16331
|
+
var displayFields = ["*"];
|
|
16332
|
+
var filterQuery = this._employeeId ? "(employee.id eq '" + this._employeeId + "')" : "(admissionDraft.id eq '" + this._admissionDraftId + "')";
|
|
16333
|
+
if (!sort) {
|
|
16334
|
+
sort = [{ field: "lastModifiedDate", order: -1 }];
|
|
16335
|
+
}
|
|
16336
|
+
this.dependentDraftService
|
|
16337
|
+
.list({ page: page, size: size, sort: sort, filterQuery: filterQuery, displayFields: displayFields })
|
|
16338
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe), operators.debounceTime(500), operators.distinctUntilChanged(), operators.finalize(function () {
|
|
16339
|
+
_this.isLoading = false;
|
|
16340
|
+
}))
|
|
16341
|
+
.subscribe(function (list) {
|
|
16342
|
+
_this.gridData = list.contents;
|
|
16343
|
+
_this.totalRecords = list.totalElements;
|
|
16344
|
+
});
|
|
16345
|
+
};
|
|
16346
|
+
DependentListDraftComponent.prototype.getProp = function (obj, path) {
|
|
16347
|
+
return path.split(".").reduce(function (result, prop) { return (result[prop] === undefined ? "" : result[prop]); }, obj);
|
|
16348
|
+
};
|
|
16349
|
+
Object.defineProperty(DependentListDraftComponent.prototype, "employeeId", {
|
|
16350
|
+
set: function (id) {
|
|
16351
|
+
this._employeeId = id;
|
|
16352
|
+
if (this._employeeId) {
|
|
16353
|
+
this.updateGrid();
|
|
16354
|
+
}
|
|
16355
|
+
},
|
|
16356
|
+
enumerable: true,
|
|
16357
|
+
configurable: true
|
|
16358
|
+
});
|
|
16359
|
+
Object.defineProperty(DependentListDraftComponent.prototype, "admissionDraftId", {
|
|
16360
|
+
set: function (id) {
|
|
16361
|
+
this._admissionDraftId = id;
|
|
16362
|
+
if (this._admissionDraftId) {
|
|
16363
|
+
this.updateGrid();
|
|
16364
|
+
}
|
|
16365
|
+
},
|
|
16366
|
+
enumerable: true,
|
|
16367
|
+
configurable: true
|
|
16368
|
+
});
|
|
16369
|
+
DependentListDraftComponent.ctorParameters = function () { return [
|
|
16370
|
+
{ type: router.ActivatedRoute },
|
|
16371
|
+
{ type: PaginatorStorageService },
|
|
16372
|
+
{ type: DependentDraftService },
|
|
16373
|
+
{ type: core$1.TranslateService },
|
|
16374
|
+
{ type: router.Router },
|
|
16375
|
+
{ type: api.ConfirmationService },
|
|
16376
|
+
{ type: api.MessageService }
|
|
16377
|
+
]; };
|
|
16378
|
+
__decorate([
|
|
16379
|
+
core.Input()
|
|
16380
|
+
], DependentListDraftComponent.prototype, "closeSideBar", void 0);
|
|
16381
|
+
__decorate([
|
|
16382
|
+
core.Output()
|
|
16383
|
+
], DependentListDraftComponent.prototype, "addButtonClicked", void 0);
|
|
16384
|
+
__decorate([
|
|
16385
|
+
core.Output()
|
|
16386
|
+
], DependentListDraftComponent.prototype, "onEdit", void 0);
|
|
16387
|
+
__decorate([
|
|
16388
|
+
core.ViewChild("dependentDraftTable")
|
|
16389
|
+
], DependentListDraftComponent.prototype, "table", void 0);
|
|
16390
|
+
__decorate([
|
|
16391
|
+
core.Input()
|
|
16392
|
+
], DependentListDraftComponent.prototype, "employeeId", null);
|
|
16393
|
+
__decorate([
|
|
16394
|
+
core.Input()
|
|
16395
|
+
], DependentListDraftComponent.prototype, "admissionDraftId", null);
|
|
16396
|
+
DependentListDraftComponent = __decorate([
|
|
16397
|
+
core.Component({
|
|
16398
|
+
selector: "app-dependent-list-draft",
|
|
16399
|
+
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"
|
|
16400
|
+
})
|
|
16401
|
+
], DependentListDraftComponent);
|
|
16402
|
+
return DependentListDraftComponent;
|
|
16403
|
+
}());
|
|
16404
|
+
|
|
16405
|
+
var moment$p = moment$q;
|
|
16033
16406
|
var EmployeeDependentListComponent = /** @class */ (function () {
|
|
16034
16407
|
function EmployeeDependentListComponent(translate, fb, cdRef, focusService, paginatorStorageService, employeeDependentService, activatedRoute, confirmationService, messageService, router) {
|
|
16035
16408
|
this.translate = translate;
|
|
@@ -16063,6 +16436,13 @@
|
|
|
16063
16436
|
enumerable: true,
|
|
16064
16437
|
configurable: true
|
|
16065
16438
|
});
|
|
16439
|
+
Object.defineProperty(EmployeeDependentListComponent.prototype, "admissionDraftId", {
|
|
16440
|
+
set: function (id) {
|
|
16441
|
+
this._admissionDraftId = id;
|
|
16442
|
+
},
|
|
16443
|
+
enumerable: true,
|
|
16444
|
+
configurable: true
|
|
16445
|
+
});
|
|
16066
16446
|
EmployeeDependentListComponent.prototype.ngAfterViewChecked = function () {
|
|
16067
16447
|
this.cdRef.detectChanges();
|
|
16068
16448
|
};
|
|
@@ -16185,13 +16565,13 @@
|
|
|
16185
16565
|
return name + " eq " + value;
|
|
16186
16566
|
}
|
|
16187
16567
|
else if (type === angularComponents.FieldType.Date) {
|
|
16188
|
-
return name + " eq '" + moment$
|
|
16568
|
+
return name + " eq '" + moment$p(value).format("YYYY-MM-DD") + "'";
|
|
16189
16569
|
}
|
|
16190
16570
|
else if (type === angularComponents.FieldType.Time) {
|
|
16191
|
-
return name + " eq '" + moment$
|
|
16571
|
+
return name + " eq '" + moment$p(value).format("HH:mm:ss") + "'";
|
|
16192
16572
|
}
|
|
16193
16573
|
else if (type === angularComponents.FieldType.DateTime) {
|
|
16194
|
-
return name + " eq '" + moment$
|
|
16574
|
+
return name + " eq '" + moment$p(value).format() + "'";
|
|
16195
16575
|
}
|
|
16196
16576
|
else if (type === angularComponents.FieldType.String) {
|
|
16197
16577
|
return "containing(upper(" + name + "), upper('" + value.replace(/'/g, "\\'") + "'))";
|
|
@@ -16291,6 +16671,11 @@
|
|
|
16291
16671
|
personId: this.personId,
|
|
16292
16672
|
});
|
|
16293
16673
|
};
|
|
16674
|
+
EmployeeDependentListComponent.prototype.onEditDraft = function (draftId) {
|
|
16675
|
+
this.employeeDependentService.setOpenSideBarAndStartForm({
|
|
16676
|
+
dependentDraftId: draftId
|
|
16677
|
+
});
|
|
16678
|
+
};
|
|
16294
16679
|
EmployeeDependentListComponent.prototype.getActions = function (rows) {
|
|
16295
16680
|
var _this = this;
|
|
16296
16681
|
return [
|
|
@@ -16356,6 +16741,9 @@
|
|
|
16356
16741
|
__decorate([
|
|
16357
16742
|
core.Input()
|
|
16358
16743
|
], EmployeeDependentListComponent.prototype, "employeeId", null);
|
|
16744
|
+
__decorate([
|
|
16745
|
+
core.Input()
|
|
16746
|
+
], EmployeeDependentListComponent.prototype, "admissionDraftId", null);
|
|
16359
16747
|
__decorate([
|
|
16360
16748
|
core.ViewChild("employeeDependentTable", { static: false })
|
|
16361
16749
|
], EmployeeDependentListComponent.prototype, "table", void 0);
|
|
@@ -16363,7 +16751,7 @@
|
|
|
16363
16751
|
core.Component({
|
|
16364
16752
|
// tslint:disable-next-line:component-selector
|
|
16365
16753
|
selector: "fnd-employee-dependent",
|
|
16366
|
-
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>",
|
|
16754
|
+
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\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\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",
|
|
16367
16755
|
styles: [".radio-buttons{display:flex;flex-direction:column;gap:6px}.person-label{display:flex;gap:5px;align-items:center}"]
|
|
16368
16756
|
})
|
|
16369
16757
|
], EmployeeDependentListComponent);
|
|
@@ -16396,10 +16784,18 @@
|
|
|
16396
16784
|
domain: "hcm_contract",
|
|
16397
16785
|
service: "employment_contract",
|
|
16398
16786
|
}),
|
|
16787
|
+
platformComponents.PermissionsModule.forChild([
|
|
16788
|
+
{
|
|
16789
|
+
name: "dependentDraft",
|
|
16790
|
+
actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
|
|
16791
|
+
uri: "res://senior.com.br/hcm_contract/employment_contract/entities/dependentDraft",
|
|
16792
|
+
},
|
|
16793
|
+
]),
|
|
16399
16794
|
tooltip.TooltipModule,
|
|
16400
16795
|
],
|
|
16401
16796
|
declarations: [
|
|
16402
16797
|
EmployeeDependentListComponent,
|
|
16798
|
+
DependentListDraftComponent,
|
|
16403
16799
|
EmployeeDependentFormComponent,
|
|
16404
16800
|
EmployeeDependentPersonalStepComponent,
|
|
16405
16801
|
EmployeeDependentComplementStepComponent,
|
|
@@ -16408,7 +16804,8 @@
|
|
|
16408
16804
|
],
|
|
16409
16805
|
providers: [
|
|
16410
16806
|
CountryService,
|
|
16411
|
-
StateService
|
|
16807
|
+
StateService,
|
|
16808
|
+
DependentDraftService
|
|
16412
16809
|
],
|
|
16413
16810
|
exports: [
|
|
16414
16811
|
EmployeeDependentListComponent,
|
|
@@ -16507,7 +16904,6 @@
|
|
|
16507
16904
|
exports.createFilterString = createFilterString;
|
|
16508
16905
|
exports.createFilterTokens = createFilterTokens;
|
|
16509
16906
|
exports.createLookupRequestFilter = createLookupRequestFilter;
|
|
16510
|
-
exports.fallback = fallback;
|
|
16511
16907
|
exports.getDefaultHistoryGridColumns = getDefaultHistoryGridColumns;
|
|
16512
16908
|
exports.getEnumQuery = getEnumQuery;
|
|
16513
16909
|
exports.getEnumTextSearchQuery = getEnumTextSearchQuery;
|
|
@@ -16536,6 +16932,8 @@
|
|
|
16536
16932
|
exports.startDateIsBeforeOrEqualToEndDateValidator = startDateIsBeforeOrEqualToEndDateValidator;
|
|
16537
16933
|
exports.startDateTimeIsBeforeEndDateTimeValidator = startDateTimeIsBeforeEndDateTimeValidator;
|
|
16538
16934
|
exports.toastTimeToLive = toastTimeToLive;
|
|
16935
|
+
exports.updateSingleControl = updateSingleControl;
|
|
16936
|
+
exports.validateSpecificControls = validateSpecificControls;
|
|
16539
16937
|
exports.verifyValidationsForm = verifyValidationsForm;
|
|
16540
16938
|
exports.ɵ0 = ɵ0;
|
|
16541
16939
|
exports.ɵa = EmployeeModule;
|
|
@@ -16544,13 +16942,15 @@
|
|
|
16544
16942
|
exports.ɵbb = E070FilService;
|
|
16545
16943
|
exports.ɵbc = ClockingEventModule;
|
|
16546
16944
|
exports.ɵbd = EmployeeSummaryService;
|
|
16547
|
-
exports.ɵbe =
|
|
16548
|
-
exports.ɵbf =
|
|
16549
|
-
exports.ɵbg =
|
|
16550
|
-
exports.ɵbh =
|
|
16551
|
-
exports.ɵbi =
|
|
16552
|
-
exports.ɵbj =
|
|
16553
|
-
exports.ɵbk =
|
|
16945
|
+
exports.ɵbe = DependentListDraftComponent;
|
|
16946
|
+
exports.ɵbf = DependentDraftService;
|
|
16947
|
+
exports.ɵbg = EmployeeDependentFormComponent;
|
|
16948
|
+
exports.ɵbh = EmployeeDependentPersonalStepComponent;
|
|
16949
|
+
exports.ɵbi = EmployeeDependentComplementStepComponent;
|
|
16950
|
+
exports.ɵbj = EmployeeDependentComplementTabComponent;
|
|
16951
|
+
exports.ɵbk = CountryService;
|
|
16952
|
+
exports.ɵbl = EmployeeDependentDocumentTabComponent;
|
|
16953
|
+
exports.ɵbm = StateService;
|
|
16554
16954
|
exports.ɵc = E001PesModule;
|
|
16555
16955
|
exports.ɵd = WorkshiftGroupModule;
|
|
16556
16956
|
exports.ɵe = WorkshiftModule;
|